I have randomly-named .jpg files in a folder (it's always C:\TEMP).
I would like to rename these files to a argument that I pass, but add a sequential number (preferably sorted by file datetime).
Then, the files would be moved to a folder that is passed in another argument (folder exists, and it's name is based on the current month, so it will always be in format "F:\PICS\yyyy-mm".
SO, I'd call something like: RENAME.BAT "MyPicture"
and the files would be renamed and moved:
I modified it for a quick test, see below.
I put a hyphen before the !Count! so it named files like "MyPicture-1.jpg"
So, is there a way to format the !Count! to force a two digit number, like "MyPicture-01.jpg" ?
Can I return the value of Count back from the batch file?
Open in new window