Solved

Batch File Copy Files and Sub-Folders Help

Posted on 2013-01-04
2
599 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
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
honestman31 earned 500 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

770 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