I'll explain what's what I'm trying to do.
From a project with thousands of files, we want to remove many of them matching a pattern, but we want to store a backup. We are looking for a method to perform a move opeation that will keep the relative folder structure in the destination.
I mean, if we have:
D:\matchingfile1.txt D:\matchingfile2.txt D:\nonmatchingfile1.txt D:\nonmatchingfile2.txt D:\foofolder\matchingfile1.txt D:\foofolder\matchingfile2.txt D:\foofolder\nonmatchingfile1.txt D:\foofolder\nonmatchingfile2.txt D:\barfolder\sub\matchingfile1.txt D:\barfolder\sub\matchingfile2.txt D:\barfolder\sub\nonmatchingfile1.txt D:\barfolder\sub\nonmatchingfile2.txt
We want to move it to D:\_BACKUP\20130527\ with this result:
D:\_BACKUP\20130527\matchingfile1.txt D:\_BACKUP\20130527\matchingfile2.txt D:\_BACKUP\20130527\foofolder\matchingfile1.txt D:\_BACKUP\20130527\foofolder\matchingfile2.txt D:\_BACKUP\20130527\barfolder\sub\matchingfile1.txt D:\_BACKUP\20130527\barfolder\sub\matchingfile2.txt
NOTE1: Files to move are not those named "matchingfile", this is just an illustrative example. What we currently extracted is a list of all the full paths of our target files (plain text), so this has to be the input of the method/command/program.
NOTE2: directory level may be any.
Work is under Windows 7 OS.
Lots of thanks in advance.