Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.
Batch script question
Name: tonysathre Date: October 3, 2006 at 16:36:17 Pacific OS: Windows XP Pro SP2 CPU/Ram: P4 2.53 Ghz\ 768 MB Product: Dell Dimension 4550
Comment:
I have a text file that I need to ECHO in REM and a space to the beginning of each line. Could someone help me out please?
Name: IVO Date: October 4, 2006 at 02:27:42 Pacific
Reply:
@Echo Off
For /F "tokens=* delims=" %%I in (%1) Do Echo Rem %%I >> %2
If the batch is named X.bat type X FileIn FileOut to get the processed text file in FileOut. No space allowed in filenames and the For /F statement fits just one line without CR/LF.
0
Response Number 2
Name: tonysathre Date: October 7, 2006 at 14:04:18 Pacific
Reply:
Sorry I mistyped, but I get it. What it needs to do is echo ECHO to the beginning of each line, except blank lines, and echo ECHO. to the beginning of each blank line.
Summary: Just for kicks and giggles, and perhaps others: ===================================================== C:\>COPY /? Copies one or more files to another location. COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A ...
Summary: Hi, I have a batch script which, amongst other things, parses and rewrites a text file using the "for /f" command. The reason it does this is to append some of the lines in the text file with the cur...
Summary: Thanks a lot that is working. One more quick question how do I kill a IE browser session from the batch script. ::== some.bat start www.Golden-Triangle.com type mydata.txt > mytest2.txt kill browser s...