40 users online | 40 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.

Most popular FAQs RSS

  1. How to remove my info from icontact, constantcontact.com ? ... (9477 views)
  2. How to backup My Documents on Windows 7 using ... (5118 views)
  3. Default Elastix default passwords (4625 views)
  4. How can I disable firewall for raspbmc (2500 views)
  5. How to SSH without password (2103 views)
  6. QueueMetrics installation Elastix (1918 views)
  7. Why Ads on this site (1768 views)
  8. Office Communicator for Linux (1707 views)
  9. Sangoma card misconfigured wancfg_dahdi (1699 views)
  10. Raspberry Pi SD card configuration (1489 views)

Latest FAQs RSS

  1. Copy Mapinfo settings from XP to a Windows 7 ... (2016-12-19 03:06)
  2. How to get logs from linux (2016-12-13 21:11)
  3. How to remove my info from icontact, constantcontact.com ? ... (2016-08-18 05:30)
  4. How to SSH without password (2016-07-12 21:57)
  5. Sangoma card misconfigured wancfg_dahdi (2016-06-11 07:46)

Sticky FAQs