Augh, how could've I missed that.
Thanks for pointing me that, totally forgot that detail.
Everything works fine now.
Thanks abc0502 for you help
Search found 104 matches
- 12 May 2013 07:17
- Forum: DOS Batch Forum
- Topic: For Command not Reading Spaces in Words
- Replies: 2
- Views: 4617
- 12 May 2013 04:23
- Forum: DOS Batch Forum
- Topic: For Command not Reading Spaces in Words
- Replies: 2
- Views: 4617
For Command not Reading Spaces in Words
Hello people. I've been using this code to capture chars form phrases ( !k wrote it here ) @echo off &setlocal enableextensions set "word=everyone!" call :ch "%word%" set char goto :eof :ch for /l %%c in (0,1,127) do ( set "w=%~1" call set "char#%%c=%%w:~%%c,1%...
- 03 May 2013 17:37
- Forum: DOS Batch Forum
- Topic: Derp Craft batch game
- Replies: 5
- Views: 6005
Re: Derp Craft batch game
Don't use ping, if your OS supports it use "timeout"
Code: Select all
timeout (number of seconds)
- 03 May 2013 17:35
- Forum: DOS Batch Forum
- Topic: robust line counter
- Replies: 22
- Views: 26650
Re: robust line counter
I use this in my batches:
Code: Select all
findstr /R /N "^" %file% | find /C ":">lines
< lines set /p "num="
del lines
- 01 May 2013 16:42
- Forum: DOS Batch Forum
- Topic: Save what's between "," and what's before "=" to variables
- Replies: 2
- Views: 3927
Re: Save what's between "," and what's before "=" to variabl
code 1 @echo off & setlocal set /a counter=1 set "line=" for /f "delims=" %%i in (myfile.txt) do set "line=%%i"&call:process set "word#" goto:eof :process if not defined line goto:eof for /f "tokens=1*delims=," %%a in ("%line%") do...
- 01 May 2013 10:56
- Forum: DOS Batch Forum
- Topic: Save what's between "," and what's before "=" to variables
- Replies: 2
- Views: 3927
Save what's between "," and what's before "=" to variables
Hello everyone. I've searched through the web but I didn't manage to find anything so here goes. I need two pieces of code, one that saves what's between "," Ex:. I have a text file/variable with the following contents: ab,abb,ba,asf,ade,te I would like the code to capture the ab,abb,ba.. ...
- 30 Apr 2013 11:46
- Forum: DOS Batch Forum
- Topic: Capturing Math batch's output to a variable
- Replies: 11
- Views: 11892
Re: Capturing Math batch's output to a variable
Which one do you guys this is faster ? :a (Other Codes) start /wait /i %ComSpec% /c "SRT_MATH.bat 2 x 2 > file" < file set /p a= (Other Codes) goto a or :a (Other Codes) >file.txt call SRT_MATH.bat 2 x 2 < file set /p a= (Other Codes) goto a I tested the time on both of them and got 0:00:1...
- 29 Apr 2013 15:50
- Forum: DOS Batch Forum
- Topic: Capturing Math batch's output to a variable
- Replies: 11
- Views: 11892
Re: Capturing Math batch's output to a variable
@echo off & setlocal for /f %%i in ('SRT_MATH.bat 2 x 2') do set /a res=%%i echo %res% That works too but you can't use numbers that are bigger than 10 digits with that for, it'll say something like "numbers are limited at a precision of 32 bit". But that would probably be faster if y...
- 29 Apr 2013 15:24
- Forum: DOS Batch Forum
- Topic: Capturing Math batch's output to a variable
- Replies: 11
- Views: 11892
Re: Capturing Math batch's output to a variable
This works for me: start /wait /i %ComSpec% /c "STR_MATH.bat (commands) > file" < file set /p output= Note quotes above. Your redirection was for a start command and not for the STR_MATH.bat command. That's why you have to put it in quotes. Hope this helps, Saso Ohh, now I see why it wasn...
- 29 Apr 2013 15:15
- Forum: DOS Batch Forum
- Topic: Capturing Math batch's output to a variable
- Replies: 11
- Views: 11892
Re: Capturing Math batch's output to a variable
This works for me: start /wait /i %ComSpec% /c "STR_MATH.bat (commands) > file" < file set /p output= Note quotes above. Your redirection was for a start command and not for the STR_MATH.bat command that's why you have to put it in quotes. Hope this helps, Saso Could your remove the color...
- 29 Apr 2013 14:57
- Forum: DOS Batch Forum
- Topic: Capturing Math batch's output to a variable
- Replies: 11
- Views: 11892
Re: Capturing Math batch's output to a variable
I would like a code that captures the output of STR_MATH.bat Please explain the output, I don't know "STR_MATH.bat". Thank you. SRT_MATH.bat is this file . The output is the result of the mathematical operation you do when you use SRT_MATH.bat Ex:. SRT_MATH.bat 2 X 2 Output in the CMD win...
- 29 Apr 2013 13:46
- Forum: DOS Batch Forum
- Topic: Capturing Math batch's output to a variable
- Replies: 11
- Views: 11892
Capturing Math batch's output to a variable
Hello everyone. So I've been searching on the web for a math script I and found one, you guys can check it out here or here . The batch works perfecly, it can process numbers bigger than 10 digits and can also use decimal numbers. The problem is that I can't capture the output when I start it with a...
- 20 Apr 2013 07:00
- Forum: DOS Batch Forum
- Topic: Problem with EnableDelayedExpansion
- Replies: 8
- Views: 9245
Re: Problem with EnableDelayedExpansion
I dunno what's going on but I can't write a single code right now
I'll just do a complete re-write in another time.
Thanks for all the help
I'll just do a complete re-write in another time.
Thanks for all the help
- 20 Apr 2013 06:26
- Forum: DOS Batch Forum
- Topic: Problem with EnableDelayedExpansion
- Replies: 8
- Views: 9245
Re: Problem with EnableDelayedExpansions
The output would be inside fileenc.txt
- 20 Apr 2013 06:11
- Forum: DOS Batch Forum
- Topic: Problem with EnableDelayedExpansion
- Replies: 8
- Views: 9245
Re: Problem with EnableDelayedExpansions
Yeah I know, it's wrong because the "word" should be the contents of %line!lines!%, but for some reason it's empty.