Search found 18 matches
- 09 Mar 2013 08:22
- Forum: DOS Batch Forum
- Topic: Where is the bug?
- Replies: 5
- Views: 3913
Re: Where is the bug?
Your if %len% LSS %b% goto koniec work as same as my IF not %len% GEQ %b% goto koniec. And this is not a problem because the file calculation hashes, set their and goes to :koniec, but does not display the encoded characters.
- 07 Mar 2013 11:50
- Forum: DOS Batch Forum
- Topic: Where is the bug?
- Replies: 5
- Views: 3913
Where is the bug?
I did keypad for 14 characters and it worked, but when I made a shorter version not display the hashes on the end. There is the code: @echo off chcp 1250 > nul color 0a :liczenie0 cls SETLOCAL ENABLEDELAYEDEXPANSION set /p str=Podaj hasło: set len=0 FOR %%a in (%str%) do ( set str3=%%a call :liczeni...
- 12 Feb 2013 02:38
- Forum: DOS Batch Forum
- Topic: Counting string length
- Replies: 5
- Views: 5505
Re: Counting string length
Thanks for all the posts and fix my script. It works as it should. You are great: Squashman and shirulkar. Thanks for your help.
- 11 Feb 2013 14:46
- Forum: DOS Batch Forum
- Topic: Counting string length
- Replies: 5
- Views: 5505
Counting string length
Checking long of word. I am doing something wrong because I must admit I do not understand in 100% how it works. I would like to enter a word and Batch will show its length so I converted that script from library: ( SETLOCAL ENABLEDELAYEDEXPANSION set "str=A!%~1!"&rem keep the A up fro...
- 11 Feb 2013 13:25
- Forum: DOS Batch Forum
- Topic: How to extract a character from a string in a script
- Replies: 5
- Views: 4813
Re: Ho to fix this scrypt
I have one more question. Do you know of a script that will calculate how many letters in the word is? Or at least if it's possible?
- 11 Feb 2013 12:37
- Forum: DOS Batch Forum
- Topic: How to extract a character from a string in a script
- Replies: 5
- Views: 4813
Re: Ho to fix this scrypt
Thanks for help but there must be:
your code showing "EST" but thanks for help, now it work as should.
Code: Select all
set string1=%str:~3%
your code showing "EST" but thanks for help, now it work as should.
- 11 Feb 2013 11:25
- Forum: DOS Batch Forum
- Topic: How to extract a character from a string in a script
- Replies: 5
- Views: 4813
How to extract a character from a string in a script
Hi, I would like to draw the first letter of the word TEST (T) but the script written by me is not working. Do you know how to fix it?
Code: Select all
setLocal EnableDelayedExpansion
set str=TEST
set string1=!str:~%1%!
echo %string1%
- 05 Feb 2013 11:06
- Forum: DOS Batch Forum
- Topic: encrypting
- Replies: 2
- Views: 3310
Re: encrypting
Thanks for this Rot13, but i wondering if it is possible do script in batch who will by encrypt input code according a formula, so that the user does not have to do that with the help of for example Rot13 ?
- 04 Feb 2013 13:54
- Forum: DOS Batch Forum
- Topic: encrypting
- Replies: 2
- Views: 3310
encrypting
Do you know script who take from user a string of letters and encrypt those letters (change the meaning) 4example for A=B B=I K=H . If user write KAB it will by HBI when he write BKA it will by IHB and so on, next it will save this "hash" in .txt file, (I hope) that You know what I mean . ...
- 31 Dec 2012 01:53
- Forum: DOS Batch Forum
- Topic: Reading from a text file
- Replies: 14
- Views: 9374
Re: Reading from a text file
These two work to display that text. @echo off echo test=this is test>iamtesting.txt set /p var=<iamtesting.txt set %var% echo %test% del iamtesting.txt pause That working grate till I set test2 in iamtesting.txt @echo off echo test=this is test>iamtesting.txt for /f "tokens=2 delims==" %...
- 30 Dec 2012 05:15
- Forum: DOS Batch Forum
- Topic: Reading from a text file
- Replies: 14
- Views: 9374
Re: Reading from a text file
I don't want to read all what is in the iamtesting.txt i want to set that test=this is test and when i write echo %test% it will show me just: this is test. Type command is not good because it show all in iamtesting.txt. If i use: FOR /F "delims=" %%G in (iamtesting.txt) do set test=%%G it...
- 29 Dec 2012 15:38
- Forum: DOS Batch Forum
- Topic: Reading from a text file
- Replies: 14
- Views: 9374
Re: Reading from a text file
Output:
test=this is testtest=this
Text=
And even if I transform your script i still can't set variable for "this is test".
test=this is testtest=this
Text=
And even if I transform your script i still can't set variable for "this is test".
- 29 Dec 2012 12:53
- Forum: DOS Batch Forum
- Topic: Reading from a text file
- Replies: 14
- Views: 9374
Reading from a text file
So, if i made a text file with text where is gap, for example test=this it test and i use FOR to read variable test it will read only "this" and skip "it test" do you know how to fix it ? There is script. I hope you understand me. @echo off IF exist iamtesting.txt goto 1 echo tes...
- 29 Dec 2012 11:39
- Forum: DOS Batch Forum
- Topic: Search
- Replies: 8
- Views: 5383
Re: Search
Thanks guys.
- 29 Dec 2012 06:14
- Forum: DOS Batch Forum
- Topic: Search
- Replies: 8
- Views: 5383
Re: Search
No . FOR EXAMPLE if i write test.txt in .bat it will be look for test.txt in hard drive and if find test.txt it will show me that test.txt was saved in C:\user\deskop or for example in D:\Downloads. In my view it should be build with function FOR.