Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Windows 7 Windows 7
Search Search
Search for:
Tech Support Guy > > >

Solved: Right command for Robocopy.


(!)

dbguru16's Avatar
dbguru16 dbguru16 is offline
Member with 93 posts.
THREAD STARTER
 
Join Date: Apr 2005
Experience: Intermediate
20-Jun-2012, 07:11 PM #1
Solved: Right command for Robocopy.
Hi,
I've been wanting to transfer my files from an old HDD to a new one exactly as they are, with the time stamps the way they are currently on the old HDD and all, and I heard that using Robocopy via the command prompt can help me do that. However, I don't want to delete everything on the old HDD. I've been looking around the internet, and anything I can find is just confusing to me.

The old external HDD that has all my files and folders is J: and the HDD I want to transfer them to which is a new internal HDD is Z:

What would be the proper command for copying everything on J: exactly as it is to Z: ? I hope I put this question in the correct section, lol, and as always, thanks for everyones help.
- Guru
- Windows 7 Home Premium 64x, 16gb ram, 4.20GHz AMD FX quad-core cpu,
mhd1360's Avatar
mhd1360 mhd1360 is offline mhd1360 has a Profile Picture
Computer Specs
Member with 416 posts.
 
Join Date: May 2012
21-Jun-2012, 02:40 AM #2
You can use this command
It will copy All files and folders with theirs attributes and timestamps from J: to Z:
Code:
 robocopy J: Z: /dcopy:T /copy:DATSOU /E
Details :

if you want you can make a directory on drive Z named "OldDriveFiles" and then copy whole data from J to that :
Code:
md z:\olddrivefiles
robocopy J: Z:\olddrivefiles /dcopy:T /copy:DATSOU /E

/DCOPY:T ==> COPY Directory Timestamps.

/copy DATSOU ==>D=Data, A=Attributes, T=Timestamps S=Security=NTFS ACLs, O=Owner info, U=aUditing info).

/E ==> copy subdirectories, including Empty ones.


You can remove which one of "DATSOU" if you want.
dbguru16's Avatar
dbguru16 dbguru16 is offline
Member with 93 posts.
THREAD STARTER
 
Join Date: Apr 2005
Experience: Intermediate
21-Jun-2012, 05:42 AM #3
AWESOME! You told me exactly what I needed to know and what it meant, appreciate it so much. I get how it works now and will definitely be giving it a try as soon as I get home from work. Thanks a bunch. =D
mhd1360's Avatar
mhd1360 mhd1360 is offline mhd1360 has a Profile Picture
Computer Specs
Member with 416 posts.
 
Join Date: May 2012
21-Jun-2012, 07:51 AM #4
Your welcome dude
dbguru16's Avatar
dbguru16 dbguru16 is offline
Member with 93 posts.
THREAD STARTER
 
Join Date: Apr 2005
Experience: Intermediate
21-Jun-2012, 01:11 PM #5
Is it ok to not use the /copy: DATSOU ? I got the error that I don't have the Manage Auditing user right and that I need that to copy auditing information (I dunno what auditing information is anyway, lol. Is it important?).
mhd1360's Avatar
mhd1360 mhd1360 is offline mhd1360 has a Profile Picture
Computer Specs
Member with 416 posts.
 
Join Date: May 2012
21-Jun-2012, 02:11 PM #6
Yes, You can ignore "U" and use /copy: DATSO
bbearren's Avatar
Computer Specs
Member with 3,732 posts.
 
Join Date: Jul 2006
Location: Central Florida (Polk County)
21-Jun-2012, 02:19 PM #7
I would use

J:\ Z:\ /E /COPYALL /XJ

/E copies folders recursively, including empty folders. /COPYALL copies all file information/attributes. /XJ excludes Junction points.
dbguru16's Avatar
dbguru16 dbguru16 is offline
Member with 93 posts.
THREAD STARTER
 
Join Date: Apr 2005
Experience: Intermediate
21-Jun-2012, 03:21 PM #8
That's so confusing, lol. What do you mean by recursively and what are Junction points? (Isn't very pro or leet at this stuff, lol.) Just got home and just finished running anti-virus on the hdd, so I'm ready to go.
mhd1360's Avatar
mhd1360 mhd1360 is offline mhd1360 has a Profile Picture
Computer Specs
Member with 416 posts.
 
Join Date: May 2012
21-Jun-2012, 03:23 PM #9
/COPYALL <=> /copy: DATSOU
dbguru16's Avatar
dbguru16 dbguru16 is offline
Member with 93 posts.
THREAD STARTER
 
Join Date: Apr 2005
Experience: Intermediate
21-Jun-2012, 03:24 PM #10
Ah, ok. Thanks.
mhd1360's Avatar
mhd1360 mhd1360 is offline mhd1360 has a Profile Picture
Computer Specs
Member with 416 posts.
 
Join Date: May 2012
21-Jun-2012, 03:24 PM #11
Both commands will work
No Problem
dbguru16's Avatar
dbguru16 dbguru16 is offline
Member with 93 posts.
THREAD STARTER
 
Join Date: Apr 2005
Experience: Intermediate
27-Jun-2012, 11:08 PM #12
It seems the only thing I can get copied is a .avi file that is not in a folder in J:
After that all I get is :

2012/06/26 22:56:28 ERROR 5 <0x00000005> Accessing Destination Directory Z:\$RECYCLE.BIN\
Access is denied.
Waiting 30 seconds...

That repeats... Not sure why, there's not a recycle bin on either drive, their just storage drives, lol.
Also, still get the ERROR about not having the Manage Auditing user right with the second way of copying everything that bbearren suggested.
bbearren's Avatar
Computer Specs
Member with 3,732 posts.
 
Join Date: Jul 2006
Location: Central Florida (Polk County)
27-Jun-2012, 11:27 PM #13
Are you using an elevated command prompt? And there is a Recycle bin on every drive, even if you have designated no Recycle bin for the drive. Windows puts an empty Recycle bin there regardless.
dbguru16's Avatar
dbguru16 dbguru16 is offline
Member with 93 posts.
THREAD STARTER
 
Join Date: Apr 2005
Experience: Intermediate
28-Jun-2012, 06:47 AM #14
I'm using the Command Prompt under Start>All Programs>Accessories. Is there a different one in Windows I should be using for this task?
Megabite's Avatar
Member with 11,761 posts.
 
Join Date: Apr 2008
28-Jun-2012, 06:56 AM #15
No, just right click on the command Prompt Icon and "Run as Admin"
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑

Content Relevant URLs by vBSEO 3.3.2