|Here's a little batch I've been using to move files with full paths specified in a txt list (filelist.txt) to a folder called "files" on the C drive:|
for /F "delims=" %%i in (filelist.txt) do (
move "%%i" c:\files
The source files listed in filelist.txt are scattered throughout a dir on an external drive that has a large and complex subdir tree, but when this batch is run, everything is moved to a single, flat c:\files dir. It's great for what it does, but one problem is that if there are any duplicate file names in filelist.txt, the batch will overwrite any previously moved 1.doc (for example) with a 1.doc further down the list.
Anyone know how to tweak this bat so that instead of moving everything to the single c:\files dir, it will--as needed--replicate the dir structure on the destination drive as it moves the files? This will prevent the overwrites, of course, but it will also be useful to have the "cloned" dir structure from the external drive under the destination dir (not the entire tree, but just the dirs/subdirs that actually contain moved files specified in filelist.txt!).