Solved

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

Posted on 2013-12-30
3
378 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
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 27

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

If you migrate a Terminal Server licenses server inside the 2008 server family, you can takte advantage of the build-in migration tool. If you like to migrate an older 2003 Server (and the installed client CALs) to a 2008 R2 server for example, you …
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now