|I need a batch file to loop through a list of jpgs in a folder, & move them to folders created based on their file names in the following convention:|
The folder names will be based on the first 8 characters of the file names, so 09-01556.A2.12.jpg would go in a folder called 09-01556.
I have the following so far which does the job nicely:
for /f %%F in ('dir/b/a-d *.jpg') do call :sub1 %%F
move %* %name:~0,8%
BUT I also need to take account of situations where a jpg file is moved to the destination and it already exists. In this case, I do not want to overwrite, but need to increment the file name whilst preserving the 'previously copied version
SO in the example above, if 09-01556.A2.12.jpg already exists in c:\mydir\09-01556, then the batch command would copy it as 09-01556.A2.12~1.jpg
I am also looking to set this script running with some kind of user interface where it runs every 5sec or so with some kind of indicator to the user that it is running