Search found 5 matches

by Billy885
30 Aug 2009 21:12
Forum: DOS Batch Forum
Topic: for /f command?
Replies: 4
Views: 7478

Perfect! DccD and much appreciated! I knew I was missing something.
by Billy885
29 Aug 2009 16:46
Forum: DOS Batch Forum
Topic: for /f command?
Replies: 4
Views: 7478

Sorry about that Avery. The line in the file that I am trying to read is fixed on number of spaces. The problem came up when the file name had spaces: "Main Training Base Day.mis" Then the above (%path_filename%) would only look for file "Main" and not find it because of the dos ...
by Billy885
27 Aug 2009 21:50
Forum: DOS Batch Forum
Topic: for /f command?
Replies: 4
Views: 7478

for /f command?

This works fine and displays what I want it to: FOR /F "tokens=1,2,* delims= " %%i in (%path_filename%) do ( if %%i == TIME echo.&echo Time of day is: %%j And here comes the but. When it finds a path or filename with spaces, it can not find the file. If I put " (quotes...
by Billy885
03 Aug 2009 00:51
Forum: DOS Batch Forum
Topic: help with using substr
Replies: 8
Views: 11165

Try these:

SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION

then use something like this inside the for command:

set /A count=!count!+1
by Billy885
02 Aug 2009 22:30
Forum: DOS Batch Forum
Topic: Best way to insert/remove line in text file?
Replies: 1
Views: 4407

Best way to insert/remove line in text file?

Hello all, Have learned a lot here and thanks for that! I have a problem that I dont have my head into yet and hoping you all can help me. Need to use batch file commands here and I need insert a line of text and then later remove that line depending on what the operator wants. Code showing sample o...