Batch file to copy certain files from list to destination preserving directory structure, robocopy?
Posted on 2007-10-13
I have a list of files that I would like to create a batch file using copy, xcopy, xxcopy or robocopy. I have tried all of the above and can't seem to figure a way to preserve the file path. I need to copy only the files in the list and to create the directory structure as it exists in the source.
I have tried copy g:\dir1\dir1001\filename g:\copydir1\dir1001\filename
all of these assume the file name is also a directory, robocopy seems to allow placing the file name on a separate line in the batch file but I can't seem to get that right either.
running XP pro SP2, I have cygin available if there is something that will work.