Access denied moving folders from Dropbox to Desktop

0

Simply put, I'm trying to move two folders from my Dropbox folder to my desktop.

Sometimes it works, sometimes it says, "Access is denied".

This is the code for the batch:

@echo off
:start
move "C:\Users\x\Dropbox\MC_Servers\ec2\Server\backups" "C:\Users\x\Desktop\Server Backups\"
move "C:\Users\x\Dropbox\MC_Servers\ec2\Server\logs" "C:\Users\x\Desktop\Server Backups\"
timeout /t 7200
goto start

I have tried running as admin, changing UAC to th lowest setting, and changing folder permissions.

Thanks for any help.

Quelklef

Posted 2015-03-09T21:09:51.923

Reputation: 578

What is your question? – Sun – 2015-03-10T16:09:38.383

How do get rid of the restriction and stop it from denying access. – Quelklef – 2015-03-10T23:14:31.343

Answers

1

Run your batch using RoboCopy. It will try more often and the access denied, if it is caused by Dropbox using the file, will eventually release it. Even with RoboCopy, Dropbox will sometimes hold files in use even after not reading it, so your mileage may vary. You may need to use a tool such as handle to close the handle a process is using to keep the file open.

Sun

Posted 2015-03-09T21:09:51.923

Reputation: 5 198

I would use robocopy, but I'm moving it in order to keep space free on my Dropbox. – Quelklef – 2015-03-09T21:44:47.507

RoboCopy has a /move flag so it will moves files. It works just like move but has more options such as a default retry... which is what you want. – Sun – 2015-03-09T23:15:10.493

Useful, but not the answer. Upvoted, though. – Quelklef – 2015-03-10T00:58:19.047

I think it addresses your issue with Access is Denied. There is a reason for being denied access and robocopy will retry until Dropbox releases the file for other software to use. Why do you feel it does not answer your question? – Sun – 2015-03-10T16:10:25.500

Because since the dropbox folder will basically be constantly used, it may not always work. – Quelklef – 2015-03-10T23:15:03.390

It will work more times then trying to move it once. You could also exit out of Dropbox before you run the script. Our as a command line use process.exe from beyond logic to kill the Dropbox.exe process via command line. – Sun – 2015-03-11T02:06:33.103