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: ROBOCOPY - Create Backup Script

29 Jul 2012   #90
jamerson

Win7 64bit
 
 

i hope my prayers come true and someone can help me create a backup script, also shows the users how many % is it doing,
actually i want to copy the users documents, and pictures and outlook PST files to different Partition,
thank you so much


My System SpecsSystem Spec
.
29 Jul 2012   #91
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

Hi jamerson,

No worries. Can you provide some more information about users/paths/file/etc. and I'll write one for you?

Regards,
Golden
My System SpecsSystem Spec
30 Jul 2012   #92
jamerson

Win7 64bit
 
 

Quote   Quote: Originally Posted by Golden View Post
Hi jamerson,

No worries. Can you provide some more information about users/paths/file/etc. and I'll write one for you?

Regards,
Golden
Thank you So much,
is it possibly to back up the whole C:\Users\James or it gonna take long time?
actually i don't need the whole folder only the importants one where windows saves document or pictures,
here are the Paths and want them to be saved to W:\Backup folder
C:\Users\James\Desktop
C:\Users\James\Favorites
C:\Users\James\Pictures
C:\Users\James\Documents
C:\Users\James\Music
C:\Users\James\Videos
C:\Users\JamesAppData\Local\Microsoft\Outlook
also i want outlook PST folder to be backed up which is on the Apps folder,so i added the path too,

once again much appreciate your support
My System SpecsSystem Spec
30 Jul 2012   #93
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

No problem James. Can you tell me the driver letter of the partition you want to backup too?

The time for backup depends on how large the folders are. If its very large, then initially the backup takes as long as it would if you used a straightforward Windows copy command, but we can use the 'mirror' facility of robocopy so that subsequent backups only copy recent files (new files or changes to existing files), whic means it will be quicker.

*EDIT : I see you mentioned W: so thats OK. I'll post back in a few minutes with the .BAT file.
My System SpecsSystem Spec
.

30 Jul 2012   #94
jamerson

Win7 64bit
 
 

Quote   Quote: Originally Posted by Golden View Post
No problem James. Can you tell me the driver letter of the partition you want to backup too?

The time for backup depends on how large the folders are. If its very large, then initially the backup takes as long as it would if you used a straightforward Windows copy command, but we can use the 'mirror' facility of robocopy so that subsequent backups only copy recent files (new files or changes to existing files), whic means it will be quicker.

*EDIT : I see you mentioned W: so thats OK. I'll post back in a few minutes with the .BAT file.
Thank you So much Golden, really appreciated,
the script you gonna make, it gonna show the process as well?
My System SpecsSystem Spec
30 Jul 2012   #95
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

Quote   Quote: Originally Posted by jamerson View Post
Quote   Quote: Originally Posted by Golden View Post
No problem James. Can you tell me the driver letter of the partition you want to backup too?

The time for backup depends on how large the folders are. If its very large, then initially the backup takes as long as it would if you used a straightforward Windows copy command, but we can use the 'mirror' facility of robocopy so that subsequent backups only copy recent files (new files or changes to existing files), whic means it will be quicker.

*EDIT : I see you mentioned W: so thats OK. I'll post back in a few minutes with the .BAT file.
Thank you So much Golden, really appreciated,
the script you gonna make, it gonna show the process as well?
Yes, it will show progress.
My System SpecsSystem Spec
30 Jul 2012   #96
jamerson

Win7 64bit
 
 

Quote   Quote: Originally Posted by Golden View Post
Quote   Quote: Originally Posted by jamerson View Post
Quote   Quote: Originally Posted by Golden View Post
No problem James. Can you tell me the driver letter of the partition you want to backup too?

The time for backup depends on how large the folders are. If its very large, then initially the backup takes as long as it would if you used a straightforward Windows copy command, but we can use the 'mirror' facility of robocopy so that subsequent backups only copy recent files (new files or changes to existing files), whic means it will be quicker.

*EDIT : I see you mentioned W: so thats OK. I'll post back in a few minutes with the .BAT file.
Thank you So much Golden, really appreciated,
the script you gonna make, it gonna show the process as well?
Yes, it will show progress.
Thank you so much, i am waiting for your script, really much appreciate it
My System SpecsSystem Spec
30 Jul 2012   #97
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

Hi,

OK. Here it is.

Instructions:
1. Download the attached .bat file, and save it to your desktop

jamerson.bat

2. Ensure OUTLOOK has been closed before running this BAT file
3. Right-click on the BAT file and choose Run as Administrator
4. If prompted by UAC, click YES
5. The BAT file will now run

It will copy everything under \\James (incl. folders) to W:\Backup. It will also copy everything under \\Outlook to W:\Backup. It will shows the progress on the screen, and also create a file called backup_log.txt on your desktop which you can open using NotePad to view the history of the backup.

At this stage, I haven't used the /mir switch - we can do that once you have seen how the BAT works, and are happy with it. Once you have run it, place a copy of the backup_log.txt file so I can check that it worked correctly.

Regards,
Golden


My System SpecsSystem Spec
30 Jul 2012   #98
jamerson

Win7 64bit
 
 

Quote   Quote: Originally Posted by Golden View Post
Hi,

OK. Here it is.

Instructions:
1. Download the attached .bat file, and save it to your desktop

Attachment 223928

2. Ensure OUTLOOK has been closed before running this BAT file
3. Right-click on the BAT file and choose Run as Administrator
4. If prompted by UAC, click YES
5. The BAT file will now run

It will copy everything under \\James (incl. folders) to W:\Backup. It will also copy everything under \\Outlook to W:\Backup. It will shows the progress on the screen, and also create a file called backup_log.txt on your desktop which you can open using NotePad to view the history of the backup.

At this stage, I haven't used the /mir switch - we can do that once you have seen how the BAT works, and are happy with it. Once you have run it, place a copy of the backup_log.txt file so I can check that it worked correctly.

Regards,
Golden
Thank you so much,
this script gonna works with Windows scheduele? and will use Admin access if i add it to the windows scheduele?
Edit: I tried the script somehow it can't read or copy the files located on AppData/Microsoft/Outlook
i used the script with admin right!
My System SpecsSystem Spec
30 Jul 2012   #99
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

Hi,

Is this path correct?

C:\Users\JamesAppData\Local\Microsoft\Outlook

or should it be

C:\Users\James\AppData\Local\Microsoft\Outlook

You can edit the BAT file and correct the path if required, and try it again please?
My System SpecsSystem Spec
Comment

 ROBOCOPY - Create Backup Script




Tutorial Tools Search this Tutorial
Search this Tutorial:

Advanced Search




Similar help and support threads
Windows 7 Tutorial Category
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 - ERROR 5 (0x00000005)
Hi, I'm wondering if anyone might be able to shed some light on why I am getting the following such errors when running a robocopy batch file (as administrator) which cause the backup script to stall (- albeit temporarily): I am using the following backup command: robocopy "%srcPath%\My...
Backup and Restore
How 2 create a script/BAT or something that changes my desktop image?
Okay so I just got this program called Transparent Screen Lock and you can run files when the program starts/locks and closes/unlocks. What I would like to do is create a script or something that changes my desktop background to an image when I click "lock" and another script to change the desktop...
Customization
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
I Need Help To Create REG. Script With Admin. Priv. For Reg. Editor?
Hello. I have a technical question/issue I wish to ask. I hope someone can help me. I am looking help for someone to modify or rewrite for me a simple system registry script for my context menu that allows or forces to "run as administrator" privileges automatically when I click on the...
Customization
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 21:59.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App