Solved

Access denied when copying over \home\%username% directories using Robocopy

Posted on 2013-12-30
3
397 Views
Last Modified: 2013-12-30
I am trying to copy over redirect profile directories \home\%username% from a 2008 Server R2 to a CIFShare on a NAS using Robocopy while applying the /e switch.  Everything copies ok except for folders that have the lock sign over the folder.  When trying to copy these the program echoes "access denied wait 30 seconds" and just repeats indefinitely. I realize these are currently being used by other users.
My question is does Robocopy have a switch or function in it that will allow these type of files/folders to be copied regardless of being in use or locked?

thank you
0
Comment
Question by:Matt_Kennedy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 17

Expert Comment

by:pjam
ID: 39746889
I am not a Robocopy user, but in my humble opinion you definitely do not want to try and copy an open or locked file. Most like will cause corruption to the file.
0
 
LVL 29

Accepted Solution

by:
serialband earned 500 total points
ID: 39747303
Robocopy can't copy files or folders that are in use.  If you use robocopy, you'll need to work around that by just running more frequent robocopies and set the retry and warnings to a much lower number.  I usually set them to 1 so I can more easily spot the errors and bypass the wait.

robocopy e:\home\%username%  f:\home\%username% /w:1 /r:1 /copyall /mir


You can run robocopy later and it will quickly pick up the missed files.

Also, robocopy runs as the user running the command.  You should probably do a runas /User:Administrator if you want access.  Unfortunately, some users remoev administrator access, so you may still have to add it back.

Assuming you have files that stay permanently inuse, this work around won't help you.  If you don't want to wait for the inuse files, you can use an open sourced 3rd party tool called hobocopy and turn on Volume Shadow Copy (VSS).  Hobocopy makes use of the shadow copy to copy files that are inuse, bypassing the limitation.  You will be getting an older copy of the file, but at least you'll get the file.  http://hobocopy.sourceforge.net/
0
 

Author Closing Comment

by:Matt_Kennedy
ID: 39747413
Thank you serialband.   That did the job!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question