Go Back   PCMech Forums > Help & Discussion > Software Discussion & Support

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 04-16-2010, 07:10 AM   #1
Member (9 bit)
 
Join Date: Mar 2001
Location: Illinois
Posts: 352
Command File Help

I have a command file that I use to copy files from the original location, to a backup location. I just noticed, that the "Files" are copying OK, but the "Folders" contained in the source folder, are NOT being copied.

Can anybody help me edit this file to also copy the folders?


Quote:
Xcopy D:\"My Documents"\*.* D:\QBackup\"My Documents"\*.* /y
bozo is offline   Reply With Quote
Old 04-16-2010, 09:39 AM   #2
Premium Member
 
Statica's Avatar
 
Join Date: Jun 1999
Posts: 9,231
Use the /S switch to copy all the non-empty directories & sub-directories .. or the /E switch if you want the empty ones as well.
Example:
Quote:
Xcopy D:\"My Documents"\*.* D:\QBackup\"My Documents"\*.* /S /y
Statica is offline   Reply With Quote
Old 04-16-2010, 10:28 AM   #3
glc
Forum Administrator
Staff
Premium Member
 
glc's Avatar
 
Join Date: May 2000
Location: Joplin MO
Posts: 37,776
Remember it this way - "richkey". That brings absolutely everything over, includes attributes, will overwrite read-only files, and it won't stop on errors.

/r/i/c/h/k/e/y
glc is offline   Reply With Quote
Old 04-17-2010, 06:16 AM   #4
Member (9 bit)
 
Join Date: Mar 2001
Location: Illinois
Posts: 352
It works!

Thanks guys...I'm glad i discovered this shortfall, before i needed it.
bozo is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:03 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2