Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: my backup script using robocopy

30 Jun 2017   #1
Hynt

Windows 7 ultimate 32bit
 
 
my backup script using robocopy

robocopy /S /E /MOV %USERPROFILE%\Documents\ G:\backup\Documents\
robocopy /S /E /MOV %USERPROFILE%\Pictures\ G:\backup\Pictures\
robocopy /S /E /MOV %USERPROFILE%\Downloads\ G:\backup\DownloadS\
robocopy /S /E /MOV %USERPROFILE%\Favorites\ G:\backup\Favorites\
robocopy /S /E /MOV %USERPROFILE%\Desktop\ G:\backup\Desktop\
robocopy /S /E /MOv %USERPROFILE%\Music\ G:\backup\Music\

rmdir /S /Q %USERPROFILE%\Documents\
rmdir /S /Q %USERPROFILE%\Pictures\
rmdir /S /Q %USERPROFILE%\Downloads\
rmdir /S /Q %USERPROFILE%\Music\
rmdir /S /Q %USERPROFILE%\Favorites\
rmdir /S /Q %USERPROFILE%\Desktop\
mkdir %USERPROFILE%\Documents
mkdir %USERPROFILE%\Pictures
mkdir %USERPROFILE%\Downloads
mkdir %USERPROFILE%\Music
mkdir %USERPROFILE%\Favorites
mkdir %USERPROFILE%\Desktop


My System SpecsSystem Spec
.
30 Jun 2017   #2
Hynt

Windows 7 ultimate 32bit
 
 

think this works better...
echo.
echo ******************************
echo *** Robocopy Backup Script ***
echo ******************************
echo.
Robocopy /MOVE /S /E %USERPROFILE%\Documents\ G:\backup\Documents\ /e /np /tee /mt:4 /log:my_backup_log.txt
Robocopy /MOVE /S /E %USERPROFILE%\Pictures\ G:\backup\Pictures\ /e /np /tee /mt:4 /log+:my_backup_log.txt
Robocopy /MOVE /S /E %USERPROFILE%\Downloads\ G:\backup\DownloadS\ /e /np /tee /mt:4 /log+:my_backup_log.txt
Robocopy /MOVE /S /E %USERPROFILE%\Desktop\ G:\backup\Desktop\ /e /np /tee /mt:4 /log+:my_backup_log.txt
Robocopy /MOVE /S /E %USERPROFILE%\Music\ G:\backup\Music\ /e /np /tee /mt:4 /log+:my_backup_log.txt
Robocopy /MOVE /S /E %USERPROFILE%\Favorites\ G:\backup\Favorites\ /e /np /tee /mt:4 /log+:my_backup_log.txt

rmdir /S /Q %USERPROFILE%\Documents\
rmdir /S /Q %USERPROFILE%\Pictures\
rmdir /S /Q %USERPROFILE%\Downloads\
rmdir /S /Q %USERPROFILE%\Music\
rmdir /S /Q %USERPROFILE%\Favorites\
rmdir /S /Q %USERPROFILE%\Desktop\
mkdir %USERPROFILE%\Desktop
mkdir %USERPROFILE%\Documents
mkdir %USERPROFILE%\Pictures
mkdir %USERPROFILE%\Downloads
mkdir %USERPROFILE%\Music
mkdir %USERPROFILE%\Favorites
pause
My System SpecsSystem Spec
30 Jun 2017   #3
Megahertz07

Windows 7 HP 64
 
 

Needs to add documentation (; move data to G: )
As I understood:
- You move data to G:
- You delete the user data folder
- You create new user data folder

So if, for any reason, it can't move data to G: all user data will be erased?
My System SpecsSystem Spec
.

30 Jun 2017   #4
Hynt

Windows 7 ultimate 32bit
 
 

The first exempel had problem.
but after editing source it''s OK"..
thanks to post here on sevenforums
My System SpecsSystem Spec
30 Jun 2017   #5
Hynt

Windows 7 ultimate 32bit
 
 

Use this script to backup user files.
It's true data on c:\ removes.
But first copy everything to g:\
My System SpecsSystem Spec
30 Jun 2017   #6
Megahertz07

Windows 7 HP 64
 
 

Backup scripts doesn't delete source data.
As I wrote, if, for some reason, it doesn't copy to G:, you will loose all data as you delete the source data.
My System SpecsSystem Spec
30 Jun 2017   #7
Hynt

Windows 7 ultimate 32bit
 
 

Small c:\ disk
Data on g:\ don't removes

backup script thats remove source data - Google Search
My System SpecsSystem Spec
01 Jul 2017   #8
Hynt

Windows 7 ultimate 32bit
 
 

Have done a small script for backup purposes because the script moves all users files and then deletes them from the c: i want to make sure that the user approves it .. feels a bit like half-time programming otherwise
My System SpecsSystem Spec
15 Jul 2017   #9
Hynt

Windows 7 ultimate 32bit
 
 

echo.
echo ******************************
echo *** Robocopy Backup Script ***
echo ******************************
echo Disk Drivers: C:\ D:\ E:\ F:\ G:\ H:\
echo all users files "folders" are then stored
echo on the disk you enter in a folder named backup!

set /p Disk=Enter Disk Driv
echo %Disk% is selected!
CLS
Robocopy /MIR /S /E %USERPROFILE%\Documents\ backup\Documents\ /e /np /tee
Robocopy /MIR /S /E %USERPROFILE%\Pictures\ F:\backup\Pictures\ /e /np /tee
Robocopy /MIR /S /E %USERPROFILE%\Downloads\ F:\backup\DownloadS\ /e /np /tee
Robocopy /MIR /S /E %USERPROFILE%\Desktop\ F:\backup\Desktop\ /e /np /tee
Robocopy /MIR /S /E %USERPROFILE%\Music\ F:\backup\Music\ /e /np /tee
Robocopy /MIR /S /E %USERPROFILE%\Favorites\ F:\backup\Favorites\ /e /np /tee
pause>nul
goto home
My System SpecsSystem Spec
15 Jul 2017   #10
Hynt

Windows 7 ultimate 32bit
 
 

Instead of f:\ .. %Disk%
My System SpecsSystem Spec
Reply

 my backup script using robocopy




Thread Tools




Similar help and support threads
Thread Forum
ROBOCOPY - Create Backup Script
How to Create a Backup Script using ROBOCOPY Command There are many paid and free software solutions available to backup critical data and files on a computer system. Many users, however, are unaware of an inbuilt Windows 7 command called ROBOCOPY (Robust File Copy) that allows users to...
Tutorials
Robocopy Script For Incremental, Differential and Full Backup
Dears, Anobody can help me to have a backup script that will help for backup requirement, Please see the details below My Source Directory is "D:\Source" My Destinationa Directory is "\\Server\Destination" I need to meet the following (1) Need to take fullbackup on every Friday ? For this...
General Discussion
robocopy script is not working through Scheduler
Dear All, My batch file of robocopy is working fine. But when I tried to run it through task scheduler, none of the files transfer to the target location. @echo off echo +-----------------------------------------+ echo Database Export Utility for server ...
General Discussion
Robocopy backup for personal folders
I have created a batch file for copying my Documents folder to an external hard drive: The log file shows that it is backing up C:\users\USERNAME\documents\My Music and C:\users\USERNAME\documents\My Pictures. That's fine, because I want those backed up anyway, but when I go to...
Backup and Restore
Anyone use robocopy to backup?
Evening all, Just curious to know if anyone uses the built in utility to backup software on your machine, im trying to backup my itunes folder to an external HD but having a few issues to get this to work properly! I also use sync toy for backing up but just really want to know what everyone...
Backup and Restore


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 20:08.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App