XCopy question for moving a file share and permissions to a new partition on the same server

I have Windows 2000 server that has a 60gb file share that needs to be moved to a new larger partition on the same server.  I'm looking for opinions on what the best tool would be to copy this data to the new partition while keeping the file permissions intact.  If XCOPY is the answer can you provide me with the syntax including appropriate switches to do this copy (including the switch to keep going if it encounters a file it cannot copy etc...)?

Will the modifiec/accessed date change of all the files/folders change if using XCOPY?  I've briefly looked into Scriptlogic's SecureCopy but don't think it's worth the $1000 for this one time data move.

Who is Participating?
You will have a log file if you run:
XCOPY d:\Projects\*.* e:\Projects\ /S/E/C/H/M/K/O >> c:\copylog.txt
Two gtages

Assumed D: - Source
              E: - Target

1. Mark all files as Archive bit on
ATTRIB +A d:\*.* /S
+A - Set Archive bit for file to ON
/S - Go through subdirectories.

2. Copy files from source to target
XCOPY d:\*.* e:\ /S/E/C/H/M/K/O
 /S           Copies directories and subdirectories except empty ones.
 /E           Copies directories and subdirectories, including empty ones.
              Same as /S /E. May be used to modify /T.
 /V           Verifies each new file.
 /C           Continues copying even if errors occur.
 /Q           Does not display file names while copying.
 /H           Copies hidden and system files also.
 /K           Copies attributes. Normal Xcopy will reset read-only attributes.
 /O           Copies file ownership and ACL information.
 /X           Copies file audit settings (implies /O).

If power fails or copy stops, run step 2 again.
I would use robocopy, this has a switch for maintaining permissions and can continue even if it encounters a problem (should you want it to)
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

knutsonitAuthor Commented:
Assume I want to only a directory (and everything in it) called D:\Projects to a new partition E:; would I need to first create a directory called "Projects" on E: for the destination placeholder? or is there a way using xcopy to have the copy job create the "Projects" directory.  The "projects" directory is the parent directory that many of the child directories have permissions progated to them.  I hope I'm making sense.  

Also what purpose does turning the archive bit on for all of the files have in the example?

Thanks again.
Better create the directory.
 use full path to make sure you know what is been copied.
XCOPY d:\Projects\*.* e:\Projects\ /S/E/C/H/M/K/O
After the file has been copied, xcopy turns the archive bit off (the /M) and if in some situation the copy stops, you can continue since /M copies only Archive bit on.
Another thing about the Archive bit is that if somehow a file has changed while the copy takes place, when you run the xcopy the second time (you should, it collects changes in long copy), it will collect the files that change.
The OS turns Archive bit on if the file has changed (saved again).
knutsonitAuthor Commented:
Is there a logfile created to see which files may not have copied over correctly?
Have a look at

Its evaluation version should get you on your way.
Yo can either create the target directory yourself and set the permissions to flow down over then start the transfer of data across from the source.
Or you can just tell Vice Versa to create the target folder exactly the same as the source folder and leave it to it.
Nice GUI interface.

Like chris_bol says you can use ROBOCOPY, it can copy or move and have log to file.

ROBOCOPY source_folder destination_folder /S /COPYALL /MOVE /LOG:MyLogfile.txt

"/COPYALL" is the copyflags to copy Data, Attributes, Timestamps, NTFS_Security_ACLs, Owner info and aUditing info.

Tou can read on ROBOCOPY here http://www.ss64.com/nt/robocopy.html

You can find the old verion here http://www.dynawell.com/support/ResKit/winnt.asp
but you can download XP's Admin Pack here http://www.dynawell.com/support/ResKit/winxp.asp

The NT 4 and Windows 2000 resource kits include Robocopy 1.95 but I recommend you download the XP version
which fixes a number of bugs - it runs fine on NT/2K
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.