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.
read a file from a batch file???
Name: pqsi Date: May 7, 2008 at 10:53:34 Pacific OS: xp pro CPU/Ram: core 2 Product: dell
Comment:
I am trying to create a batch file to read a text file that will only contain either a 1 or a 0 and report it back.
-- read.bat -- @ECHO OFF FIND "1" test.txt IF ERRORLEVEL 1 GOTO zero IF ERRORLEVEL 0 GOTO one
:error ECHO There was some error. GOTO exit
:one REM we found 1 in a file ECHO Test.txt contains 1 GOTO exit
:zero REM File does not contain 1, but it doesn't REM mean it contains 0 FIND "0" test.txt IF ERRORLEVEL 1 GOTO error IF ERRORLEVEL 0 GOTO realzero GOTO error
Summary: How can i read rows of a file from my batch file?. This: for %d in (%@line[file.dat,row])do ... don't works in windows95. sorry my ignorance. thanks!...
Summary: I don't know, but there are plenty of examples on the net, you should search for it. The FIND command will search for a text string in a file: find "string" [path:filename] Then you can use SET to as...
Summary: Hi All, I wish to be able to rename a file using part of a line in another file as the new name. I have a file named Variable.var which is basically a text file, in that file is a line reading WEEKNO=...