Below is my block of code that iterates through my text file (FILELIST) and then searches for the file in a source directory (FILESPATH). If found, it then copies the renamed file to the destination directory (DESTPATH).
There are 2 more mods that I need to make to this script: (1) initially all of my source files were PDFs, so I hard coded the extension in the destination of the XCOPY command. Source files can now also be JPEG files, so the rename needs to use the proper extension, and (2) the script prompts me each time it tries to copy a file to enter F or D, can i silently execute the F so the script will run start to finish without user input?
for /f %%X in (%FIILELIST%) do (
set /a Index+=1
xcopy /qvs "%FILESPATH%\%%~X" "%DESTPATH%\!Index:~-4!.pdf"
Thanks for your help.