Computing.Net > Forums > Windows XP > Win XP batch to read text file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Win XP batch to read text file

Reply to Message Icon

Name: klint
Date: October 30, 2007 at 04:44:14 Pacific
OS: Windows XP
CPU/Ram: Pentium
Product: IBM
Comment:

Hi, I've written a cmd.exe batch file to read text from a file, something like this:

for /f %%s in (file.txt) do call process "%s"

This works fine except that it skips blanks lines. Is there any way to prevent it skipping blank lines?

I know I can use other languages (Perl, Javascript, tcsh, PowerShell etc), but I want to use nothing other than cmd.exe (no external helper utilities either) as I'm doing it as a learning exercise.

Thanks
Klint




Sponsored Link
Ads by Google

Response Number 1
Name: Ewen
Date: October 30, 2007 at 16:05:42 Pacific
Reply:

Try here: http://www.computing.net/programmin...

Once I thought I was wrong, now I'm not so sure!


0
Reply to Message Icon

Related Posts

See More


Format gives error messag... Dell 1501 No Networking A...



Post Locked

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


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Win XP batch to read text file

Win XP fail to login & MS-Dos www.computing.net/answers/windows-xp/win-xp-fail-to-login-amp-msdos/151935.html

win xp Backup to CD error www.computing.net/answers/windows-xp/win-xp-backup-to-cd-error-/66707.html

win xp can't create paging file .!!! www.computing.net/answers/windows-xp/win-xp-cant-create-paging-file-/22460.html