thomasuponor
New Member
- Joined
- Sep 13, 2018
- Messages
- 44
- Office Version
- 2016
- Platform
- Windows
I have a folder with many pictures named as number.jpg (ex: 100152.jpg, 100153.jpg). I don't want to copy everything in this folder— only the files with the exact name as the names in a txt file that I have created.
I am using this in the prompt. However, all pictures from SourceFolder are copied to DestinationFolder. I think something must be wrong in the txt file.
I am using this in the prompt. However, all pictures from SourceFolder are copied to DestinationFolder. I think something must be wrong in the txt file.
JavaScript:
FOR /F "USEBACKQ TOKENS=*" %F IN ("C:\Folder\FileList.txt") DO XCOPY /F /Y "C:\SourceFolder\%~F" "C:\DestinationFolder\"