I am looking for a Windows/Dos based method to rename and copy/move files based on a CSV import file contents.
Import file example: "C:\Dir1\File001.txt","Q:\Dir02\Dir03\Dir04\NewFile001.txt" "C:\Dir2\File002.txt","Q:\Dir05\Dir06\Dir07\NewFile002.txt" "C:\Dir3\File003.txt","Q:\Dir08\Dir09\Dir10\NewFile003.txt"
What I need
Ideally the method would take the above as input and copy/move files from Column 1 to Column 2 while creating any necessary directories.
I'm also looking for some error handling such as
- Can't create directory / folder (for whatever reason)
- File Already Exists - either at the destination or because the rename input puts two files with the same name in the same directory.
- Have a way to deal with collisions (add suffix, etc).
What I've tried
I've tried the following apps so far but have not been able to get them to work as I need so wanted to see if there's a different method rather than software that'll do this sort of operation with Windows:
- Tried to use the "Import Pairs" function but got no results. (Literally nothing happens with no errors.)
- Can import my load file, but it only uses the file names from Column 2. Doesn't move the files into the folders.
Dos Batch using move or copy
Existing files get overwritten, the error messages for long paths/filenames are non descriptive, no error correction for duplicate filenames.
My batch copy
COPY /Y "C:\Dir1\File001.txt" "Q:\Dir02\Dir03\Dir04\NewFile001.txt"
Any other suggestions or methods that will work and suffice for all my needs if possible would be greatly appreciated since everything I have tried comes up short of the expected result for the specified reasons so I was curious if someone on SuperUser can help me with this task.