30 users online | 30 Guests and 0 Registered

How to backup My Documents on Windows 7 using batch script


The following script will create a folder on the D: drive named as today's date in numeric format, this is great if you need to schedule your PC to run Backups on a specific time of the day and provide you with several versions of My Document folder, you could send them to your Dropbox folder, Mega, etc.

 

-----> Save the script bellow as MYDocs.bat and run it.

 

set myDate=%date:~4,2%%date:~7,2%%date:~10%
mkdir h:\%myDate%
robocopy "c:\users\%username%"\Documents\ H:\%myDate% /e /R:1 /v /np /eta /w:2 /PURGE /XD TEMP >c:\users\%username%"\Desktop\MYDocs.txt

set myDate=%date:~4,2%%date:~7,2%%date:~10%

mkdir D:\%myDate%

robocopy "c:\users\%username%"\Documents\ D:\%myDate% /e /R:1 /v /np /eta /w:2 /PURGE /XD TEMP >c:\users\%username%"\Desktop\MYDocs.txt

 

curve

curve
curve

curve

Tags: backup my Documents, batch script, command line, create folders by date, create unique folder name, Documents, dropbox, Mega, my documents backup, Robocopy, script, synch, Win7 backup, Windows
Last update:
2014-04-02 21:19
Author:
Eric Pezoa
Revision:
1.13
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.

Records in this category

Tags

Sticky FAQs