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

19 Jan 2013   #200

Windows 7 Home Premium x64

I'll have a look around and see what I can find. Thanks.

My System SpecsSystem Spec
19 Jan 2013   #201
Microsoft MVP

Windows 7 Ult. x64

Imaging using something like Macrium would probably be a better option.
My System SpecsSystem Spec
19 Jan 2013   #202

Windows 7 Home Premium x64

Yeah, but I'm not willing to pay for macrium and the free version doesn't let you exclude folders or backup certain folders.
My System SpecsSystem Spec
15 Apr 2013   #203

win server 2008 r2 (64bit)
Robocopy Log file Maximum Size

Dear Experts,

I have robocopy running continuously to mirror a folder every X hours. The windows 2008R2 server running the code is set to start the script at startup. Everything appears to be working fine, except the log files are becoming to be gigs big (too big to open with notepad, etc). I can manually stop the process, rename the log file, then the restart the process, but I am looking for a way to programmatically limit the size of the log file. Is this possible? Thanks!

My System SpecsSystem Spec

16 Apr 2013   #204
Microsoft MVP

Windows 7 Ult. x64


Unfortunately, its not possible to limit the size of the logfile - that would defeat the purpose of the the logfile : to log everything it does.

A workaround might be to write to a new logfile every X hours, so you write to several different named logfiles during the course of a day. Perhaps using the date to name the logfile, like this?

SET log_fname=%prefix%%date:~-4,4%%date:~-10,2%%date:~-7,2%.log
My System SpecsSystem Spec
25 May 2013   #205
Nuno Lopes

Windows 7 Ultimate 32bit

Hi all,

Ive create a .bat file with the help of this tutorial, to make a backup of a directorie to my Skydrive account, this is the script.

robocopy.exe "C:\Radio\DXLab" "C:\Users\userid\SkyDrive\Radio\DXLab Backups\teste" /e /mir /np /z /tee /log:backup_log.txt

Now what I was trying to do is:

Inside DXLab directorie is an Folder - Luncher, with an Luncher.exe, that lunches 7 applications, and when I terminate the Luncher.exe it terminates all 7 applications.

Now what I wanna do is when Luncher.exe close, the Backup.bat will make the backup of that session.

I've already converted .bat to .exe and the script works good.

Any ideia on how to do this.

My System SpecsSystem Spec
01 Jul 2013   #206
Ezra NLV

Windows 7 Professional x64
How to MOVE deleted file/folder to another location instead of deletin


I am hoping if someone can help me with a backup solution I have in mind.

I have a production site and an offsite.
Daily, I want to do a backup from production to offsite.

Challenge is, if files or folders are deleted from source, then the files/folders from destination must be MOVED to a folder in \\OffSiteServer\ShareName1\DELETED\<DateOfBackup>\path structure to file/folder.
Using the purge or mir does not work for me (for the moment) as it just purges off the data from destination. I need to keep the data for several years.

- The idea is to have a snapshot every beginning of the month. (Easy to manage this using \\OffsiteServer\ShareName1\<DateOfBackup>.)
- Next, incremental daily backup using /MAXAGE:1 (Easy to manage this as well using \\OffsiteServer\ShareName1\<DateOfBackup> and /MAXAGE:1)
- But the MOVING of files/folder from destination is something I cannot figure out how to achieve.
- The monthly snapshot is not to be touched as it is a snapshot as at that point in time. A comparison has to be done somehow if a file/folder has been deleted, then copy it from last available backup date to \\OffSiteServer\ShareName1\DELETED\<DateOfBackup>\path structure to file/folder. Additionally, it has to check in the \\OffSiteServer\ShareName1\DELETED subfolders that if it has been deleted already, it should not copy the file/folder into DELETED again (i.e. no multiple copies daily).

No, I do not have a script at the moment as I am lost at this point.

I would appreciate any help anyone can render at this moment.

Thank you all for your kind help.

Best Regards,
My System SpecsSystem Spec
16 Dec 2013   #207

64 bit win 7 home premium
robocopy help

Hi all:

Just need a little help with closing the window automatically. I run a .bat file that contains:

robocopy C:\Users\VA\Documents T:\ /mir /maxage:3 /r:0 /w:0 /np /mt /xf Backup-TC /log+:robobackuplog.txt

I would like the window to close automatically when done. Tried adding exit, didn't work. Any help is appreciated!
My System SpecsSystem Spec
16 Dec 2013   #208
Microsoft MVP

Windows 7 Ult. x64

Try using :

start "" robocopy C:\Users\VA\Documents T:\ /mir /maxage:3 /r:0 /w:0 /np /mt /xf Backup-TC /log+:robobackuplog.txt
My System SpecsSystem Spec
16 Dec 2013   #209

64 bit win 7 home premium

It didn't work...any other ideas?

I attached a screen shot.

Thanks again.

Attached Images
ROBOCOPY - Create Backup Script-capture.jpg 
My System SpecsSystem Spec

 ROBOCOPY - Create Backup Script

Thread Tools

Similar help and support threads
Thread Forum
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...
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...
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:09.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App