Robocopy fail to create directories on local hard drive Error 1 Incorrect Function

0

I'm having an issue with robocopy in which every call to create a new directory on the destination fails. I get outputs such as:

2019/03/19 16:59:11 ERROR 1 (0x00000001) Creating Destination Directory T:\tmp\MIDCAS_SSP\Documents\Customer Reviews\MASPS 1 review\Received Comments\

The copy operation I am attempting is from a sharepoint list mapped to drive X: onto a subdirectory of a physical hard drive T:

OS Name Microsoft Windows 10 Home, Version 10.0.17134 Build 17134

I have tried several variants, run command as both user and admin. Below is the commands and printout of one of many attempts.

PS T:\tmp\MIDCAS_SSP> .\Sync_XNet.bat
T:\tmp\MIDCAS_SSP>SET Target=T:\tmp\MIDCAS_SSP\Documents
T:\tmp\MIDCAS_SSP>ECHO T:\tmp\MIDCAS_SSP\Documents
T:\tmp\MIDCAS_SSP\Documents
T:\tmp\MIDCAS_SSP>Set XNetSource=X:
T:\tmp\MIDCAS_SSP>net use X: "\\site.name.domain@SSL\DavWWWRoot\sites\MidcasSSP\Shared Documents"
T:\tmp\MIDCAS_SSP>robocopy /XJ /ZB /MIR /FFT /NDL /TS  /R:1 /W:2 "X: " "T:\tmp\MIDCAS_SSP\Documents "

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

  Started : Tue Mar 19 16:59:11 2019

   Source = X:\
     Dest : T:\tmp\MIDCAS_SSP\Documents\

    Files : *.*

  Options : *.* /FFT /TS /NDL /S /E /COPY:DAT /PURGE /MIR /ZB /XJ /R:1 /W:2

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

2019/03/19 16:59:11 ERROR 1 (0x00000001) Creating Destination Directory T:\tmp\MIDCAS_SSP\Documents\Customer Reviews\MASPS 1 review\Received Comments\
Incorrect function.
Waiting 2 seconds... Retrying...
2019/03/19 16:59:13 ERROR 1 (0x00000001) Creating Destination Directory T:\tmp\MIDCAS_SSP\Documents\Customer Reviews\MASPS 1 review\Received Comments\
Incorrect function.

ERROR: RETRY LIMIT EXCEEDED.

I've checked user and admin rights to the disk. If I manually create the missing directories, any files therein are copied as intended until a new subdirectory is found but that's a lot of work to get through...

The above listing is using Windows 10 robocopy, but also using the Windows Server 2003 Resource Kit version I have the same problem.

I've also attempted to connect using https:// syntax for the net use command. After I post this I'll reboot as a last ditch attempt.

Ideas where I went wrong? Alternative approaches to back up a remote SharePoint sites' files to off-site disk?

sharepoint
webdav
robocopy
asked on Stack Overflow Mar 19, 2019 by ErikP • edited Mar 19, 2019 by ErikP

1 Answer

1

I ran into the same problem, and googling brought me here. Ultimately I didn't find why it doesn't work, but a workaround that did the job for me was to copy the directory structure first using xcopy.

Example:

xcopy /t /e  "\\intranet.companyname.com\departments\deptname\Procedures\" "z:\backup\"
robocopy.exe "\\intranet.companyname.com\departments\deptname\Procedures\" "z:\backup" /mir /R:0
answered on Stack Overflow Oct 9, 2019 by Nuit

User contributions licensed under CC BY-SA 3.0