Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Batch file to copy certain files from list to destination preserving directory structure, robocopy?

Posted on 2007-10-13
Medium Priority
Last Modified: 2008-01-09
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.
Question by:NoelAlford
1 Comment

Accepted Solution

tkfast earned 2000 total points
ID: 20072059
I would recommend using this version on rysnc it is designed for windows.


Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Starting up a Project
Loops Section Overview

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question