Script to copy select folders/files based on an external list in a text file
Posted on 2014-01-07
I have a directory on a windows server that contains over 100,000 documents and I would like to copy some of these to a different drive but I need to preserve the folder structure as well. I have a list of the folder/file names in a text file and would like a script to automate this process. How would I do this?
For example, the directory has folders/files similar to this:
My text file might contain something like this:
So I would like my script to loop through the list in the text file and only copy those files while preserving the folder structure.
So the new directory would be: