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

22 Feb 2014   #230

Microsoft Community Contributor Award Recipient

Win 10 Pro x64

Quote   Quote: Originally Posted by epoc View Post

The issue - when I attach my phone to a PC with a USB cable, I see it listed in Windows Explorer along with the hard drives and DVD on the PC. It's labeled "SPH-L710".
Specs - Sprint Cell Phones SPH-L710 | Samsung Cell Phones

Following on Kari's advice about using Mass Storage Mode to be able to give it a drive letter.

There does seem to be quite a few queries about how to enable this, everything I could find requires the phone to be rooted though.

My System SpecsSystem Spec
22 Feb 2014   #231
A Guy

Microsoft Community Contributor Award Recipient

Windows 7 Home Premium x64 SP1

My searches all said the phone must be rooted for the various workarounds (apps, etc.). A Guy
My System SpecsSystem Spec
22 Feb 2014   #232

Windows 7 Home Premium 32 bit

I appreciate the feedback. I won't be ale to root the phone due to a situation outside my control (employer security controls, and they pay the bill). I will just do copy/paste to backup the cell phone for now.

Again, thank you for the replies.
My System SpecsSystem Spec
25 Feb 2014   #233

Need help

Hi ,
I have been having hard time getting a script working my target is the following ,
1- TO have the script prompt the user for their windows user name
2- Prompt the user for their USB drive letter X:
3- Back up the entire user profile based on the user name input considering some users on XP other on 7
4- Backup will copy PST files
5- Backup C:\Program Files (x86)\Notes\Data

There was a post it does the same task but for some reason it’s not working for me .

Thank you in advance .
My System SpecsSystem Spec

18 Jun 2014   #234

Windows 7 Pro Version 6.1.7601 Service Pack 1 Build 7601, clean OEM re-install

Quote   Quote: Originally Posted by Golden View Post

...... ROBOCOPY is designed to backup/copy folders to another destination (different disk, external USB drive). The idea is that if the original files are accidently deleted or damaged, you can simply copy the required from the backup location to where you need them.

If you need help setting up a robocopy script to backup your data, then let me know and I'll write one for you.

Hello - I indeed need help with the syntax for running a robocopy script to copy my data in three folders on external HDD (partition G) to the main data folder on the internal SSD data partition D with the parameters attaching the disk management info of the disks/partitions

· Copy all subfolders (there are over 1000 folders) and files
· Keep the original time/date stamps of all folders and files
· Keep original attributes, permissions/access/owner info, etc.
· One of the three folders is about 30GB so please help with the multi-thread parameter set up
· Keep a copy of log file to know that the script ran okay and if any files couldn’t be copied over.

ROBOCOPY - Create Backup Script-20140614-diskmgmt-ssd-ext-hdd.jpg

Also, to which location should the script be saved (I have 2 user accounts: an admin and a standard user) in the standard user's Users folder? or in C partition? and I probably need to run as administrator, right?

I had used an older version of SyncBack for data backup and just tried FreeFileSync. But with both programs, all the subfolders had newly created dates and did not retain the original folders’ date/time stamps when the data was copied. Is such a setting available in these programs that I didn't see to set up?

3) If not, can robocopy be used for incremental backups as well as full? How to schedule the script to run a set backup routine?

5) A side question: I plan to use a 1TB external HDD for the image backups and the data backups; should I have just one partition and make two main folders to keep these backups separate or should I make separate partitions? How should the security tab read for permissions/access - that is, should both user accounts have full control

I've been working on this for several days without much luck so greatly appreciate some timely help!

My System SpecsSystem Spec
18 Jun 2014   #235

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1

robocopy c:\source d:\target /e /b /efsraw /copyall /dcopy:t /r:2 /w:5 /xj /xd "System Volume Information" /XF pagefile.sys hiberfil.sys /log:d:\robocopy.log
Robocopy Syntax, Command Line Switches and Examples « My Digital Life

Maybe add /MT:16 (16 threads. 8 is default). /MT is not compatible with /EFSRAW !
My System SpecsSystem Spec
18 Jun 2014   #236

Windows 7 Pro Version 6.1.7601 Service Pack 1 Build 7601, clean OEM re-install

Thank you...I don't have encrypted files to copy onto the SSD so will remove the /EFSRAW parameter to be able to use the /MT:16 parameter and give this a try. ---dpwoodpecker
My System SpecsSystem Spec
19 Jun 2014   #237

Windows 7 Pro Version 6.1.7601 Service Pack 1 Build 7601, clean OEM re-install

I got errors running the command line suggested – flags that my admin user doesn’t have Manage Auditing user rights needed for parameter /copyall. Then was flagged with not having Backup and Restore rights when I changed to /copy: with DATSO just to see it would run at all. Attached is the log and the properties/security tab info for source G: (external HDD) and the destination D: (internal SSD).

20140618 Robocopy log.txt

ROBOCOPY - Create Backup Script-20140614-partition-g-securitytab-info.jpg

ROBOCOPY - Create Backup Script-20140614-partition-d-securitytab-info2.jpg

Background info: I was logged on admin user account and I just typed cmd in the run…command box that opened up the command prompt window with the blinking cursor at prompt C:\Users\UBC-Admin> ----just wondered whether the robocopy command should be executed from this directory.

I would also appreciate getting help in doing this in a way that I can use notepad to edit the necessary command line parameters as needed and then somehow run the command from that file instead of having to retype the entire long line every time and to add to the log file instead of overwriting it.....hope this make sense and thank you for timely help!

My System SpecsSystem Spec
08 Jul 2014   #238

Windows 7 Ultimate 32-bit
Catastrophic failure

I imagine it is possible for the remote file structure to be compromised in such a way that running the backup script will simply replace your backup copy with an empty directory or empty files.

I've thought of a few ways to counteract this - one would be to create rolling backups by date and perhaps check size - if there is a major change in size, then throw an alert. Unfortunately this increases copy time as you're copying the whole file structure again each time.

The other option is to have it go through a dry run (/L), note if an inoranate number of files have been removed and don't perform the final action without interactive authorization but otherwise execute it automatically. (this is what I'm doing now, albeit manually).

Any more strategies that may be out there?

Or am I just being overly paranoid? Do these glitches just not happen? Remote mount points or file structure links get switched is just not something that happens?

Reviewed the prior posts in this thread but didn't see this brought up.

My System SpecsSystem Spec
27 Aug 2014   #239

Windows 7
Don't Understand Robocopy Actions


I have a written a Robocopy bat file to back up the files on my laptop to a portable USB connected drive. I had some issues with the date functions but got that straightened out.

Here is the bat file:

@Echo Off
Echo You must run this file by right clicking and run as Administrator.
Echo If not you won't get all the files. Crtl C exits.
If exist E:\ (Echo. External USB HD ready for BackUp) else (Echo. No External USB HD detected & Goto :EOF)

For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set ToDay=%%c-%%a-%%b)

Robocopy "C:\Users\%UserName%\Favorites" "E:\Ray_BackUp-%ToDay%\Favorites" /E /Z /XA:H /R:10 /W:20

Robocopy "C:\Users\%UserName%\Desktop\*.bat" "E:\Ray_BackUp_%ToDay%\Desktop" /E/Z /XA:H /R:10 /W:20

Robocopy "C:\Users\%UserName%\Documents" "E:\Ray_BackUp_%ToDay%\My Documents" /E /Z /XA:H /R:10 /W:20

Robocopy "C:\Users\%UserName%\AppData\Local\Microsoft\Windows Live Mail" "E:\Ray_BackUp_%ToDay%\Windows Mail" /E/Z /XA:H /R:10 /W:20

Robocopy "C:\Xnews_test 2006.06.28" "E:\Ray_BackUp_%ToDay%\XNEWS" /E /COPYALL /R:10 /W:20

Set ToDay=
Echo. All Done

When I run this bat file as an Administrator, it produces 5 folders:

Ray_BackUp_2014-08-27 which contains the Favorites folder and its contents
Ray_BackUp_2014-08-27 which contains the Desktop folder and this bat file
Ray_BackUp_2014-08-27 which contains the My Documents folder and its contents
Ray_BackUp_2014-08-27 which contains the Windows Live Mail Folder and its contents
Ray_BackUp_2014-08-27 which contains the XNEWS Folder and its contents.

So everything gets copied, however, I really wanted something like this:

Ray_BackUp_2014-08-27 with a subfolder for Favorites
a subfolder for Desktop
a subfolder for My Documents
a subfolder for Windows Live Mail
a subfolder for XNEWS

Just so you know, I keep 2 backups and delete the oldest backup so I don't want to mess with using the feature that copies only the newest files, etc.

So can someone help me fix my bat file to get the desired results?

Thanks in advance for your help and suggestions!
My System SpecsSystem Spec

 ROBOCOPY - Create Backup Script

Thread Tools

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