Solved

robocopy error

Posted on 2013-11-21
10
2,719 Views
Last Modified: 2013-11-22
Using Windows 8.1 / 64-bit.

I made a robocopy batch file called runRobo.bat. When I run it, I get this error:

ERROR 1920: The file cannot be access by the system.

I choose Run As Administrator, and still get this same error.

The batch file code is below; what do you think I am missing here?

Thanks for any advice!

Eric


@echo off
:: variables
set drive=i:\
set folder=%date:~10,4%_%date:~4,2%_%date:~7,2%_%hour%_%time:~3,2%
set backupcmd=robocopy /E /W:2

echo ### Backing up directory...
%backupcmd% "c:\Users\Eric\SkyDrive" "%drive%\%folder%"
%backupcmd% "e:\webwork" "%drive%\%folder%"
%backupcmd% "e:\analog 6.0"" "%drive%\%folder%"
%backupcmd% "e:\books" "%drive%\%folder%"
%backupcmd% "e:\sleep" "%drive%\%folder%"

echo Backup Complete!
@pause

Open in new window

0
Comment
Question by:Eric Bourland
[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
  • 5
  • 3
  • 2
10 Comments
 
LVL 14

Assisted Solution

by:Michael Dyer
Michael Dyer earned 250 total points
ID: 39668104
On line 10 you have an extra quote sign after 6.0.  Remove that and you should be good.
0
 
LVL 3

Author Comment

by:Eric Bourland
ID: 39668109
<grin> I fixed the extra quotation mark -- thank you, Equitrac!

I am still getting that same error, though. I wonder if this is a permissions problem?

### Backing up directory...

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows

-------------------------------------------------------------------------------

  Started : Thursday, November 21, 2013 11:57:02 PM
   Source : c:\Users\Eric\SkyDrive\
     Dest : i:\2013_11_21__57\

    Files : *.*

  Options : *.* /S /E /DCOPY:DA /COPY:DAT /R:1000000 /W:2

------------------------------------------------------------------------------

          New Dir         51    c:\Users\Eric\SkyDrive\
            New File                 506        BACKUP PROGRAM.txt
2013/11/21 23:57:12 ERROR 1920 (0x00000780) Copying File c:\Users\Eric\SkyDrive\
BACKUP PROGRAM.txt
The file cannot be accessed by the system.
Waiting 2 seconds... Retrying...
            New File                 506        BACKUP PROGRAM.txt
2013/11/21 23:57:14 ERROR 1920 (0x00000780) Copying File c:\Users\Eric\SkyDrive\
BACKUP PROGRAM.txt
The file cannot be accessed by the system.
Waiting 2 seconds... Retrying...
            New File                 506        BACKUP PROGRAM.txt
2013/11/21 23:57:16 ERROR 1920 (0x00000780) Copying File c:\Users\Eric\SkyDrive\
BACKUP PROGRAM.txt
The file cannot be accessed by the system.
Waiting 2 seconds... Retrying...
            New File                 506        BACKUP PROGRAM.txt
2013/11/21 23:57:18 ERROR 1920 (0x00000780) Copying File c:\Users\Eric\SkyDrive\
BACKUP PROGRAM.txt
The file cannot be accessed by the system.
Waiting 2 seconds... Retrying...
            New File                 506        BACKUP PROGRAM.txt
2013/11/21 23:57:20 ERROR 1920 (0x00000780) Copying File c:\Users\Eric\SkyDrive\
BACKUP PROGRAM.txt
The file cannot be accessed by the system.
Waiting 2 seconds... Retrying...
0
 
LVL 14

Expert Comment

by:Michael Dyer
ID: 39668117
Sure seems like a rights issue - you could try adding /B to the backup command to see if it will run in backup mode.
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 3

Author Comment

by:Eric Bourland
ID: 39668125
Tried adding /B but no luck: still getting that 1920 error.

I also deleted the volume of the backup drive, put a new volume and formatted in NTFS, and assigned drive letter I: .... thinking Windows 8.1 would like that better. But nope.

I wonder if the robocopy program cannot read my Skydrive folder on my hard drive.
0
 
LVL 3

Author Comment

by:Eric Bourland
ID: 39668127
That is the problem. The robocopy command works great until it reaches folder:

c:\Users\Eric\SkyDrive\

Interesting. Researching this....
0
 
LVL 14

Expert Comment

by:Michael Dyer
ID: 39668141
Maybe try adding a line like this at the beginning

Copy c:\Users\Eric\SkyDrive\*.* c:\temp\skytemp

And then run the robocopy against the temp folder and see if that works

If so, add del c:\temp\skytemp\*.* at the end to clear out he temp folder when done.
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 250 total points
ID: 39668182
I donMt use skydrive at the moment to test as I have dropbox in use but this link suggests that if you use the 'make available offline' option in skydrive then it genuinely syncs them offline rather than just pretending, I assume at the moment it is a stub of a file like when you get issues with junction points to follow.

http://social.technet.microsoft.com/Forums/en-US/6a5912f9-afed-413b-ab65-f0f880af4d49/robocopy-and-windows-81-pro-local-skydrive-folders-fail?forum=w8itprogeneral
0
 
LVL 3

Author Closing Comment

by:Eric Bourland
ID: 39669456
>>> the 'make available offline' option in skydrive

That was it. Thank you, dragon-it. Also thank you Equitrac_Michael for your time and expertise, and for correcting my script syntax. =)

I'll divide these points evenly, if that is OK with you both. Thank you both very much. This solves a big problem, and I learned some things. =)

Hope your day is going great.

Eric
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 39669589
No problem, I will no doubt come across the issue with a customer using Skydrive shortly so you saved me having to scratch my head then!   I presume until a specific file is downloaded locally and cached then it is just a pointer to be able to download the actual file on demand.

Steve
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Determining the an SCCM package name from the Package ID
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
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…

695 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