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.
DOS - FOR Command
Name: JAVO Date: August 1, 2006 at 12:01:37 Pacific OS: XP CPU/Ram: N/A Product: N/A
Comment:
I need help with a batch file. Basically I've got a list of servers I need to run through and running a command for each. Here it is.
for /f %%a in (serverlist.txt) do srvsec \\%%a >> srvsec.txt
That command above works great.. No problems. But I need to be able to echo the %%a before I run the srvsec command.. My question is how do I run 2 commands using something like the above?
Summary: I am attempting to 'rename' 3 .csv files in a directory using the following 'for' command in a batch file: for %%i in (*.csv) do (rename "%%i" "NewName%%i") The 3 files get renamed & then the first fi...
Summary: Im not familiar with the FOR command, well not good... But couldnt you use FOR "Skip=1" %%a IN (Old Txt file) DO ECHO %%a>>new text file DEL Old Txt File RENAME new text file Old Txt File I only Bat...