Computing.Net > Forums > Programming > Batch script question

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

Reply to Message Icon

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?

Thanks,

Tony

"Computer security." — Oxymoron



Sponsored Link
Ads by Google

Response Number 1
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.

Thanks, I think I can figure it out from here.

"Computer security." — Oxymoron


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Visual Basic Service Pack... Javascript check digit ge...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch script question

batch syntax question www.computing.net/answers/programming/batch-syntax-question/9088.html

Can I speed up my Batch script? www.computing.net/answers/programming/can-i-speed-up-my-batch-script/14412.html

MS Dos batch Script Help www.computing.net/answers/programming/ms-dos-batch-script-help/14592.html