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: Backing up files using Robocopy

07 Apr 2012   #1
kevindd992002

Windows 7 Ultimate x6
 
 
Backing up files using Robocopy

The default copy switch of robocopy is /COPYAT if you don't specify any copy options. This is the code I'm using:

robocopy C:\ D:\Backup RAMDisk.img /copyall /R:5 /W:15 /V /log:\Users\Kevin\Desktop\robocopy_log.txt

The RAMDisk.img file that I'm copying is a compressed image file. Now with that syntax /COPYAT will be used which means that it will copy all attributes of that file. Whenever I run this, I successfully copy the file but it doesn't retain the compression attribute of that file.

What could be wrong with this? Both source and destination are NTFS-formatted.


My System SpecsSystem Spec
.
07 Apr 2012   #2
F5ing

Windows 7 Ultimate x64
 
 

Although compression is indicated via a file's attributes, I'm not sure if that particular property actually transfers with the copy, even with Robocopy. If you copy to a compressed folder (folder and contents) then I would think the copy would be compressed. And if that folder is not compreesed, files that are placed there will be uncompressed (even if you are copying a compressed file to that location).
My System SpecsSystem Spec
07 Apr 2012   #3
kevindd992002

Windows 7 Ultimate x6
 
 

Quote   Quote: Originally Posted by sibbil View Post
Although compression is indicated via a file's attributes, I'm not sure if that particular property actually transfers with the copy, even with Robocopy. If you copy to a compressed folder (folder and contents) then I would think the copy would be compressed.
But I want only that specific file to be compressed though, is there any other way? I tried using the /a+:c switch of robocopy wherein it compresses the file when it is already in the destination folder regardless of the attributes of the original file but when it gives me an error of "cannot change attribute because file is accessed by another program" or something within those lines.
My System SpecsSystem Spec
.

07 Apr 2012   #4
F5ing

Windows 7 Ultimate x64
 
 

Does it work this way with any of the other files you move?

For a test, see if you can manually compress the destination file after copying it over.
My System SpecsSystem Spec
07 Apr 2012   #5
kevindd992002

Windows 7 Ultimate x6
 
 

Quote   Quote: Originally Posted by sibbil View Post
Does it work this way with any of the other files you move?

For a test, see if you can manually compress the destination file after copying it over.
Yes, I tried another file and it has the same problem.

I did manually compress the file after copying it over and it worked without a hitch.
My System SpecsSystem Spec
07 Apr 2012   #6
F5ing

Windows 7 Ultimate x64
 
 

It's been a long time since I've used robocopy, but it tells you something when you can see it can be done manually. I'm just not sure if the compression attribute is one that's carried over with the copyall switch. I would tend to think not.

It may be, that if the destination file already exists, and it's compressed, the new copy will also be compressed.
My System SpecsSystem Spec
07 Apr 2012   #7
kevindd992002

Windows 7 Ultimate x6
 
 

Quote   Quote: Originally Posted by sibbil View Post
It's been a long time since I've used robocopy, but it tells you something when you can see it can be done manually. I'm just not sure if the compression attribute is one that's carried over with the copyall switch. I would tend to think not.

It may be, that if the destination file already exists, and it's compressed, the new copy will also be compressed.
Hmmm, I tried your suggestion which is rerunning my script when the file in the destination folder is already compressed and it seemed to work. My only concern is that when the script is finished the size of the file started big and then after a few seconds it gets smaller and smaller until ultimately it becomes the same size as the original (source) compressed file. Is this normal behavior? The file is just 512MB in size and 79.8MB in size in disk.
My System SpecsSystem Spec
07 Apr 2012   #8
F5ing

Windows 7 Ultimate x64
 
 

It may be uncompressing source, copying, then recompressing target. I know that's what happens when a copy/move is done across a network. Here's a pretty good article on it (compression is about 2/3 down):

How NTFS Works: Local File Systems
My System SpecsSystem Spec
07 Apr 2012   #9
kevindd992002

Windows 7 Ultimate x6
 
 

Hmmm, yeah. So this is the only temporary fix you can think of for my issue?
My System SpecsSystem Spec
08 Apr 2012   #10
F5ing

Windows 7 Ultimate x64
 
 

How about /copy:dat instead of /copy:at.

The reason I'm thinking to try that is the fact that in addition to the compressed attribute, there is more data stored in the file that relates to compression.

Kind of a shot in the dark, though.
My System SpecsSystem Spec
Reply

 Backing up files using Robocopy




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Robocopy not copying My Document files
Hi, I just started using Robocopy to backup my files to my JBOD recently and I noticed that it does not copy anything in My Document folder. Here is the result log for Robocopy regarding the backup. Even though it says that it copied 22831 files the destination folder says it has not been modified...
Backup and Restore
Used Robocopy and deleted my files - how can I recover them?
Hi I've just re-organised my hard drives and I've set up a batch routine to backup my files, using Robocopy. However, as I swapped my drives around, I've copied in the wrong direction. Robocopy has consequently deleted entire folders of important data. The data isn't in the recycle bin. ...
Backup and Restore
Robocopy / view backed up files on external drive
Started using robocopy to do my backups. In my command lines, i can specify directories on a external drive to backup to.Some directories show up and i see everything. My most important directory " my documents" DOESNT SHOW UP. I have confirmed a backup is occuring, via log file and properties on...
General Discussion
how to robocopy files with similar names
Hello all, I need to robocopy many files which starts with the same name for Example (Ari, Arit, Ariel, Arik, Aris) I tried robocopy source_file\ari*.* destination_file\ari*.* however it is nto working do someone can help with that. Thanks Orfi
General Discussion
How to Robocopy my files to Linkstation.
I have setup a bat file to copy my files to the linkstation. As Below: Robocopy "C:\Users\User\Documents\Janine" "B:\Documents\Janine" /MIR /E /SEC But when it gets to certain files it says access denied. How do I get it to copy these files with permissions...
General Discussion
Need Help with backing up Files
Ok so in a few days im getting windows 7 but i dont know how to Backup my files because i want to do a clean install. Is there any way to do this?
General Discussion


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 00:00.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App