CommandLineFu — COPY FILES WITHOUT CHANGING ATTRIBUTES

xxcopy “k:\foo” “k:\bar” /e /tc /h /bb /k /pb /yy /oN..\barfoo.log

/e           ==           copy all files and folders recursively
/tc          ==           do not modify date and time stamps (create, mod, and access)
/h           ==           include hidden files
/bb         ==           skip file if it already exists
/k            ==           preserve source permissions
/pb         ==           display progress bar
/yy         ==           automatically reply “YES” to all prompts
/oN..\barfoo.log    ==           create a logfile in the directory above working directory named barfoo.log

( go to http://www.xxcopy.com/xcpydnld.htm to download the latest version of xxcopy )

When running my own copy jobs I typically disregard the ‘Progress Bar’ switch because it has to sit there and calculate the number of files about to be copied (useless to us geeks). Eliminating the /PB switch allows the copy process to begin immediately.

If you want to get real clever create a batch file containing a single xxcopy command for each folder that you want to copy, and create a script to launch each one individually.

Copy Script 1:
xxcopy k:\copytest1 k:\outputtest1 /e /tc /h /bb /k /yy /oNcopy00.log

Copy Script 2:
xxcopy k:\copytest2 k:\outputtest2 /e /tc /h /bb /k /yy /oNcopy02.log

Copy Script 3:
xxcopy k:\copytest3 k:\outputtest3 /e /tc /h /bb /k /yy /oNcopy03.log

Launch Copy Scripts Script:
@echo off
##create destination folder structure
xxcopy k:\copytest k:\outputtest /t
##call on individual copy scripts
start call k:\bat0.bat
start call k:\bat1.bat
start call k:\bat2.bat
start call k:\bat3.bat
start call k:\bat4.bat
start call k:\bat5.bat
start call k:\bat6.bat
start call k:\bat7.bat
start call k:\bat8.bat
##kill unnecessary shells
taskkill /im cmd.exe /f
exit

( Change video quality to HD/720p to watch in full screen )
___________________________________________________________________________________

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s