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.
FOR Statment, MAX using Variable
Name: cardguy1000 Date: December 26, 2003 at 02:12:45 Pacific OS: XP CPU/Ram: 2000+/768
Comment:
I'm trying to make a batch file in dos, and I can't seem to get a Variable to work as my MAX in a FOR statement, here is my code: SET NumDisks = 5 FOR /L %%i IN (1, 1, %NumDisks%) DO (ECHO Test)
If I replace %NumDisks% with 5 it works, can you not use variables as your max or is my syntax wrong??? Thanks.
Summary: I am developing a script using MSDOS batch files for searching for strings in a directory My requirement is as follows I have a text file with a set of labels I have to search if each label is used in...
Summary: I want to be able to use variables to dos commands from a file. What i need is something like %d%, and when it comes to it in a batch file. It will display whatever is in that text. Sort of like cop...
Summary: Hi all! Probably a silly question, but I'm rather new to batch programming and the following just doesn't make sense to me at all! @ECHO OFF SETLOCAL SET CNTR=0 FOR %%i IN (one,two,three) DO ( SET ...