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

14 Jan 2014   #220
BLAU0179

W7 64bit
 
 
Robocopy

Great!! Now is working perfectly in both ways. Manual and Task Scheduler. Many many thanks.


My System SpecsSystem Spec
.
14 Jan 2014   #221
Golden
Microsoft MVP

Windows 7 Ult. x64
 
 

My pleasure - thanks for feedback
My System SpecsSystem Spec
24 Jan 2014   #222
mkakat

windows 8.1 64
 
 

Dear All I have a simple script to backup a folder that I work on to a USB HD. I have another HD that Has over 40 folder and looking for a script that will copy all the folders to another HD.

Is this the only way?

robocopy E:\folderA G:\folderA
robocopy E:\folderB G:\folderB and so on or is there another way.

any help is welcome

Reagards
My System SpecsSystem Spec
24 Jan 2014   #223
Kaktussoft

Microsoft Community Contributor Award Recipient

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

Quote   Quote: Originally Posted by mkakat View Post
Dear All I have a simple script to backup a folder that I work on to a USB HD. I have another HD that Has over 40 folder and looking for a script that will copy all the folders to another HD.

Is this the only way?

robocopy E:\folderA G:\folderA
robocopy E:\folderB G:\folderB and so on or is there another way.

any help is welcome

Reagards
You want to copy ALL folders from E to G (same structure)?
Also all files in E: ?

You want to keep all permissions, readonly attributes, creationdat/modifictaondates, file owner.... etc?
My System SpecsSystem Spec
.

24 Jan 2014   #224
Kaktussoft

Microsoft Community Contributor Award Recipient

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

Quote   Quote: Originally Posted by mkakat View Post
Dear All I have a simple script to backup a folder that I work on to a USB HD. I have another HD that Has over 40 folder and looking for a script that will copy all the folders to another HD.

Is this the only way?

robocopy E:\folderA G:\folderA
robocopy E:\folderB G:\folderB and so on or is there another way.

any help is welcome

Reagards
Code:
 
robocopy e:\  g:\  /e /b /efsraw /copyall /dcopy:t /r:2 /w:5 /xj /xd "System Volume Information" /XF pagefile.sys hiberfil.sys
My System SpecsSystem Spec
25 Jan 2014   #225
mkakat

windows 8.1 64
 
 

Hi Kaktussoft

Thank you very much for the script it works exactly as I wanted it to.

Thanks again and keep the good work up.

Regards
My System SpecsSystem Spec
09 Feb 2014   #226
0pTicaL

Windows 7 Ultimate x64 SP1
 
 

Let me know if I should start a new thread for this.

In regards to the multithread switch MT[:n] I'm using a Intel 2600K so naturally I would set it to 8 threads (I know /MT is 8 thread by default) but Robocopy allows for up to 128 threads. What are the advantages/disadvantages of using more threads? Will it copy faster or slower? All my transfers are from one physical hdd to another.

If I use the multithread switch will I increase fragmentation on the source drive? or does Robocopy pre-allocate files before copying?


*UPDATE*

After experimenting with the /MT swtich I noticed 2 things/bugs:

1) 'Date Modified' timestamp for nested directories is not copied over if /MT switch is used. Lets say you have folder A and within folder A you have folders 1, 2, 3, 4 and 5. If /MT switch is used 'Date Modified' timestamp will not be copied over for folders 1 through 5, however 'Date Created' will be copied over.

2) Speed in Bytes/sec. and MegaBytes/min. will not be displayed/reported when job is complete.
My System SpecsSystem Spec
22 Feb 2014   #227
epoc

Windows 7 Home Premium 32 bit
 
 
Looking to RoboCopy from cell phone

I decided to use RoboCopy to backup my cell phone. I have been using it to backup several PCs and servers for about a year with excellent results.

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".

I use the DiskPart command as part of my RoboCopy script to show me the drives on the PC. However, DiskPart doesn't show the phone as a hard drive (or anything else).

I looked in Explorer and sure enough there is no drive letter associated with the phone.

Question is... How do I reference the phone as a location to copy from ??
My System SpecsSystem Spec
22 Feb 2014   #228
A Guy

Microsoft Community Contributor Award Recipient

Windows 7 Home Premium x64 SP1
 
 

Quote   Quote: Originally Posted by epoc View Post
I decided to use RoboCopy to backup my cell phone. I have been using it to backup several PCs and servers for about a year with excellent results.

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".

I use the DiskPart command as part of my RoboCopy script to show me the drives on the PC. However, DiskPart doesn't show the phone as a hard drive (or anything else).

I looked in Explorer and sure enough there is no drive letter associated with the phone.

Question is... How do I reference the phone as a location to copy from ??
Have a look here:

Quote:
The Phone is not mounted as a standard USB device, so it isn't assigned a drive letter. Instead it is being mounted as a MTP device. Microsoft is being "user friendly" in the Explorer shell by giving it a path, and you can browse the folders etc. But I think it is only being seen by Explorer, and it isn't recognized as a storage device at the actual OS level. So the robocopy command doesn't see it.
2nd post HERE

A Guy
My System SpecsSystem Spec
22 Feb 2014   #229
Kari

Microsoft Community Contributor Award Recipient

 

Quote   Quote: Originally Posted by epoc View Post
I decided to use RoboCopy to backup my cell phone. I have been using it to backup several PCs and servers for about a year with excellent results.
...
I looked in Explorer and sure enough there is no drive letter associated with the phone.
RoboCopy needs both source and target paths and cannot be used if either of them has no valid path available.

Not knowing what phone you have and not knowing other than Windows / Symbian / Meego / Maemo phones, I cannot be sure if your phone offers this option, but for instance my older Nokia N900 phone lets me select the mode when I connect it to PC, either a PC Suite Mode (no drive letter) or Mass Storage Mode (phone acts as normal external USB storage with drive letter).

My Windows Phones always get a drive letter automatically.
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 19:25.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App