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.
Daily Batch file to create new fold
Name: JamieB Date: June 5, 2008 at 06:51:54 Pacific OS: XP CPU/Ram: 1Gb Product: Dell
Comment:
I need a batchfile to create a new folder daily. The folder is named using the same naming convention every day, the number just increases by 1.
Ex:
Folder001 Folder002 Folder003
This goes on until we reach Folder999, then it goes back to Folder001.
The below batch does the job saving the last generated number into FNUM.TXT in the batch folder. You have to edit the statement
MD "Folder%N%"
replacing Folder with your naming convention.
:: FNUM.BAT Usage: FNUM @echo off if not exist %~dpn0.txt ( set N=1 ) else ( set /P N=<%~dpn0.txt ) set M=%N% if %M% lss 100 set N=0%N% if %M% lss 10 set N=0%N% MD "Folder%N%" set /A M+=1 if %M% gtr 999 set M=1 Echo.%M%> %~dpn0.txt for %%j in (N M) do set %%J= :: End_Of_Batch
0
Response Number 2
Name: JamieB Date: June 5, 2008 at 08:47:14 Pacific
Summary: I need to place a shortcut on everyone's PC in the office to a program we're running on the server ... so I need them all to get a shorcut to the executable. I want to create a batch file that creates...
Summary: I dont get what you mean! Are you asking me to try those and see what happens?? I am a newbie at all of this. In fact I was quite chuffed with myself when I wrote a small batch file to create an index...
Summary: test and make sure it gives you what you need. @echo off :again echo do you want to use the new data? echo type y or n set /p choice= if [%choice%]==[] goto again if [%choice%]==[y] goto 1 if [%choic...