?
Solved

Batch File Copy Files and Sub-Folders Help

Posted on 2013-01-04
2
Medium Priority
?
614 Views
Last Modified: 2013-01-04
I need to create a batch file that will backup/copy the entire contents of my Marketing Directory.  My marketing directory contains files and sub-directories with files.  I have used xcopy in the past but it is not picking up any of the sub-directories or their contents.  In the end i would like a batch file to copy the entire directory structure as it is.
0
Comment
Question by:deklinm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
honestman31 earned 2000 total points
ID: 38746125
use this  xcopy sourcepath destinationpath /e

also this one  
XCOPY "C:\Users" "K:\My Vista Backup" /D /E /C /R /I /K /Y

source
http://en.kioskea.net/forum/affich-30405-creating-a-batch-file-to-copy-a-directory
0
 
LVL 10

Expert Comment

by:honestman31
ID: 38746135
@Echo Off 
xcopy c:\source d:\target /s/e
exit 

Open in new window


s means for sub-directories ( recursive )
e means even empty directory
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

752 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