Solved

Batch File Copy Files and Sub-Folders Help

Posted on 2013-01-04
2
612 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 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

AutoHotkey is an excellent, free, open source programming/scripting language for Windows. It started out as a keyboard/mouse macros product, but has expanded into a robust language. This article provides an introduction to it, with links to addition…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

724 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