We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
Writing a Batch File?
Comments
-
Thanks to all who contributed...
Now that its up and running, can I customise it so it only copies files that have changed? Or is that something this command isn't capable of?Regards,
Money Saver0 -
If you ever need another option, FreeFileSync is a great utility for copying files - no script-writing required. It's a bit like Microsoft's SyncToy, but without the bugs! (A directory of files copied with SyncToy always seems to contain fewer files than the original copy when transferring a large number of files.)
FreeFileSync will first compare the source and destination directories, and only copy modified files. You can choose various other options - such as whether to overwrite files automatically or not, whether to delete files in the destination directory that have been deleted from the source (or not). Once it's configured as you like, you can create an icon that you can just double-click to repeat the file copying process.0 -
xcopy c:\documents and settings\username e:\backup /D /E /C /R /H /I /K /Y
to only copy changed files0 -
At the end of your xcopy statement, add a space followed by the following:
/D:11-12-2010
This will only copy files changed on or after the given date.
NOTE! This date is in the format mm-dd-yyyy.
EDIT: or as jaydeeuk1 has hinted at, you can use /D without a date and this will only copy files where the date on the C drive is later than the date on the external drive.You're spelling is effecting me so much. Im trying not to be phased by it but your all making me loose my mind on mass!! My head is loosing it's hair. I'm going to take myself off the electoral role like I should of done ages ago and move to the Caribean. I already brought my plane ticket, all be it a refundable 1.0 -
Takes me back to those heady days of tinkering with config.sys and autoexec.bat to fine tune memory usage. himem.sys, emm386, dos=high etc.
Multi option startups for dos gaming mode. All good fun.
I still use a couple of batch files to clean various drive areas and archive stuff.Apparently I'm 10 years old on MSE. Happy birthday to me...etc0 -
Multi option startups for dos gaming mode. All good fun.
I get chills just thinking about it!! :eek:
You're spelling is effecting me so much. Im trying not to be phased by it but your all making me loose my mind on mass!! My head is loosing it's hair. I'm going to take myself off the electoral role like I should of done ages ago and move to the Caribean. I already brought my plane ticket, all be it a refundable 1.0 -
You can use /M to limit the xcopy to changed files. This also resets the 'updated' flag on copied files so they don't get picked up again until changed.0
-
Personally I would (and do!) use the extremely wonderful ROBOCOPY, which comes with Windows 7.
But if you're happy with XCOPY, stick with it!0 -
Personally I would (and do!) use the extremely wonderful ROBOCOPY, which comes with Windows 7.
Robocopy is the replacement for xcopy - it's got a pile of extra features that may be useful, including setting a max file size to copy etc. It also seems more reliable for network copies. If you want to use it, it is available for older versions of windows as an additional download. For Windows XP, you need the Windows Resource Kit here:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
NB it says Windows Server 2003 up at the top, but XP is also supported.0
This discussion has been closed.
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 352.3K Banking & Borrowing
- 253.6K Reduce Debt & Boost Income
- 454.3K Spending & Discounts
- 245.3K Work, Benefits & Business
- 601.1K Mortgages, Homes & Bills
- 177.5K Life & Family
- 259.2K Travel & Transport
- 1.5M Hobbies & Leisure
- 16K Discuss & Feedback
- 37.7K Read-Only Boards
