Robocopy ошибка 2 0x00000002

  • Remove From My Forums
  • Question

  • Hi All,

    I have a problem when using robot copy. when robot will try to copy the office 2007/2010 temp file as is start ~$xxx.xlsx . but robot copy will fail to locate the file.

    Can i set the robot copy dont copy the office temp file.

    below is my script.

    robocopy «\XXIT» «D:BackupIT» /e /mir /XX /np /z /mt /log+:IT_backup_log.txt

    • Moved by

      Wednesday, April 2, 2014 2:52 AM
      Moving to more appropriate forum

Answers

  • Add «XF ~*.*»  to your copy command?   (I haven’t tried it myself.)

    >robocopy «\XXIT» «D:BackupIT» /e /mir /XX /np /z /mt /xf ~*.* /log+:IT_backup_log.txt


    Bob Comer

    • Marked as answer by
      kelvin_hsu
      Tuesday, April 15, 2014 1:24 AM

    • Marked as answer by
      kelvin_hsu
      Tuesday, April 15, 2014 1:23 AM
  • Remove From My Forums
  • Question

  • Hi,

    My Robocopy will copy files that is not exist in the target. it always happen when i open .xlsx system generate temp as ~$xx.xlsx . after i close the files. when robocopy start it will need looking for .xlsx file.

    below is the errror code.

    Robocopy ERROR 2 (0x00000002) Copying File \xxxxx~$xxxx.xlsx The system cannot find the file specified.

    below is my script
    robocopy «\XXXX» «D:XXXX» /e /mir /XX /np /z /mt /log+:XX_backup_log.txt

Answers

    • Marked as answer by

      Tuesday, April 8, 2014 9:47 AM

Author David Rees

davidr4


This person is a Verified Professional

This person is a verified professional.

Verify your account
to enable IT peers to see that you are a professional.

habanero

I put [ ] there to show where a space might be in the folder name.   Go back into command prompt and try to copy and paste that whole path from windows explorer into a cd command.  Copy and paste it instead of typing it out.  

cd e:multimediamultimedia archive2013 CW-TW worship media

or CD to the multimedia archive folder and do a dir command to list all the folders

Double check permissions.


Was this post helpful?
thumb_up
thumb_down

Hello Experts,

I have ran into a issue that has me stumped. I have this batch file that I use to backup a laptop to a network drive. The backup has been working correctly for many months with no errors, now earlier this week I have started getting this error msg:

ERROR 2 (0x00000002) Creating Destination Directory F:HP6910pDailyBackupDesktop_New1Scripts
The system cannot find the file specified.
Waiting 30 seconds… Retrying…

2012/10/19 11:21:39 ERROR 2 (0x00000002) Creating Destination Directory F:HP6910pDailyBackupDesktop_New1Scripts
The system cannot find the file specified.
Waiting 30 seconds… Retrying…

What is causing this and how do I fix it?

I have tried changing the destination path but that fails also.

I have other laptops that are running this same script to the same network drive(different folders on the drive) and they are all working fine.

Any help would be great.

Below is the code that is in a file named backup.bat. Text version is attached.

echo %Date% %time%
@echo on
echo ==================================================:  %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

rem cleanup the harddrive
echo Disk Cleanup Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
c:windowssystem32cleanmgr.exe /dc /sagerun: 1

c:
cd
cd c:windowsprefetch
del *.* /q
c:
cd

IF NOT EXIST F:NUL goto NOT_EXIST
ECHO DRIVE F: IS READY >> C:UserspardoneDesktopScriptsBackUpLog.txt
@ping 127.0.0.1 -n 2 -w 12000 > nul
echo Disk Cleanup Completed: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

cd C:UserspardoneDesktopScripts

echo BackUp Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo Log Files Are Located At F:HP6910pDailyBackupLogs >> C:UserspardoneDesktopScriptsBackUpLog.txt

rem shutdown outlook, communicator and firefox
taskkill /im outlook.exe /F
echo Mircosoft Outlook Shutdown: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

taskkill /im communicator.exe /F
echo Mircosoft Communicator Shutdown: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

taskkill /im firefox.exe /F
echo Firefox Shutdown: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

@ping 127.0.0.1 -n 2 -w 12000 > nul

echo PST Copy Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
robocopy «C:PST» «F:HP6910pDailyBackupPST» /MIR /COPY:DT /FFT /MT:50 /LOG:BackUpLogPST.txt
robocopy «C:UserspardoneDesktopScripts» «F:HP6910pDailyBackupLogs» BackUpLogPST.txt
rename F:HP6910pDailyBackupLogsBackUpLogPST.txt BackUpLogPST_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt
del «C:UserspardoneDesktopScriptsBackUpLogPST.txt»
echo PST Copy Completed: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo Details are in BackUpLogPST_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt Located @ F:HP6910pDailyBackupLogs >> C:UserspardoneDesktopScriptsBackUpLog.txt

echo Outlook Copy Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
robocopy «C:UserspardoneAppDataLocalMicrosoftOutlook» «F:HP6910pDailyBackupOutlook» /MIR /COPY:DT /FFT /MT:50 /LOG:BackUpLogOutlook.txt
robocopy «C:UserspardoneDesktopScripts» «F:HP6910pDailyBackupLogs» BackUpLogOutlook.txt
rename F:HP6910pDailyBackupLogsBackUpLogOutlook.txt BackUpLogOutlook_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt
del «C:UserspardoneDesktopScriptsBackUpLogOutlook.txt»
echo Outlook Copy Completed: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo Details are in BackUpLogOutlook_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt Located @ F:HP6910pDailyBackupLogs >> C:UserspardoneDesktopScriptsBackUpLog.txt

start «» «C:Program Files (x86)Microsoft OfficeOFFICE14outlook.exe»
echo Mircosoft Outlook Application Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

start «» «C:Program Files (x86)Microsoft Lynccommunicator.exe»
echo Mircosoft Communicator Application Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

echo Desktop Copy Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
robocopy «C:UserspardoneDesktop» «F:HP6910pDailyBackupDesktop_New1» /MIR /COPY:DT /FFT /MT:50 /LOG:BackUpLogDesktop.txt
robocopy «C:UserspardoneDesktopScripts» «F:HP6910pDailyBackupLogs» BackUpLogDesktop.txt
rename F:HP6910pDailyBackupLogsBackUpLogDesktop.txt BackUpLogDesktop_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt
del «C:UserspardoneDesktopScriptsBackUpLogDesktop.txt»
echo Desktop Copy Completed: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo Details are in BackUpLogDesktop_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt Located @ F:HP6910pDailyBackupLogs >> C:UserspardoneDesktopScriptsBackUpLog.txt

echo My Documents Copy Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
robocopy «C:UserspardoneMy Documents» «F:HP6910pDailyBackupMy Documents» /MIR /COPY:DT /FFT /MT:50 /LOG:BackUpLogDocuments.txt
robocopy «C:UserspardoneDesktopScripts» «F:HP6910pDailyBackupLogs» BackUpLogDocuments.txt
rename F:HP6910pDailyBackupLogsBackUpLogDocuments.txt BackUpLogDocuments_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt
del «C:UserspardoneDesktopScriptsBackUpLogDocuments.txt»
echo My Documents Copy Completed: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo Details are in BackUpLogDocuments_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt Located @ F:HP6910pDailyBackupLogs >> C:UserspardoneDesktopScriptsBackUpLog.txt

echo Favorites Copy Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
robocopy «C:UserspardoneFavorites» «F:HP6910pDailyBackupFavorites» /MIR /COPY:DT /FFT /MT:50 /LOG:BackUpLogFavorites.txt
robocopy «C:UserspardoneDesktopScripts» «F:HP6910pDailyBackupLogs» BackUpLogFavorites.txt
rename F:HP6910pDailyBackupLogsBackUpLogFavorites.txt BackUpLogFavorites_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt
del «C:UserspardoneDesktopScriptsBackUpLogFavorites.txt»
echo Favorites Copy Completed: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo Details are in BackUpLogFavorites_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt Located @ F:HP6910pDailyBackupLogs >> C:UserspardoneDesktopScriptsBackUpLog.txt

echo Firefox Copy Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
robocopy «C:UserspardoneAppDataRoamingMozillaFirefox» «F:HP6910pDailyBackupFirefox» /MIR /COPY:DT /FFT /MT:50 /LOG:BackUpLogFirefox.txt
robocopy «C:UserspardoneDesktopScripts» «F:HP6910pDailyBackupLogs» BackUpLogFirefox.txt
rename F:HP6910pDailyBackupLogsBackUpLogFirefox.txt BackUpLogFirefox_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt
del «C:UserspardoneDesktopScriptsBackUpLogFirefox.txt»
echo Firefox Copy Completed: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo Details are in BackUpLogFirefox_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt Located @ F:HP6910pDailyBackupLogs >> C:UserspardoneDesktopScriptsBackUpLog.txt

rem start «» «C:Program Files (x86)Mozilla Firefoxfirefox.exe»
rem echo Firefox Application Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

echo BackUp Finished: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo ==================================================:  %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

:NOT_EXIST
rem echo BackUp Did Not Run: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
rem Echo DRIVE F: IS NOT READY >> C:UserspardoneDesktopScriptsBackUpLog.txt
rem echo ==================================================:  %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
rem GOTO END

:END

Backup.txt

Hello I am trying to move the users directory from my C drive to my D drive to free up some space. I found this thread from a quick google search. I wasn’t sure how to «boot to installation media». I inserted what I believe is the windows installation disc, but nothing happens when I restart, which I believe is due to boot order settings in BIOS.

In any event, I just hit F8 after restarting the computer, went into repair mode and clicked on command prompt. The command prompt had this:

Microsoft Windows [Version 6.1.7601]

X:windowssystem32>

After the «system32>» I typed the following (taken from the top comment of the above link):

robocopy c:Users d:Users /mir /xj /copyall

I then got:

ROBOCOPY :: Robust File Copy for Windows

Started: Thu Jun 26 15:58:35 2014

Source : c:Users
Dest : d:Users

Files: *.*

Options: *.* /S /E /COPYALL /PURGE /MIR /XJ /R:1000000 /W:30

2014/06/24 15:58:35 ERROR 2 <0X00000002> Accessing Source Directory c:Users

The system cannot find the file specified.

Any ideas what’s going on? It’s running windows 7. There are just a couple files in the d drive currently, nothing else. I had previously copied some files from users in the c drive and pasted them to the d drive, and then deleted them from the c drive, but I don’t think that’s an issue.

I really need to free up some space on the c drive, so if someone could help with this or suggest another way to clear up space on the c drive, that would be a big help — thanks!

Hello Experts,

I have ran into a issue that has me stumped. I have this batch file that I use to backup a laptop to a network drive. The backup has been working correctly for many months with no errors, now earlier this week I have started getting this error msg:

ERROR 2 (0x00000002) Creating Destination Directory F:HP6910pDailyBackupDesktop_New1Scripts
The system cannot find the file specified.
Waiting 30 seconds… Retrying…

2012/10/19 11:21:39 ERROR 2 (0x00000002) Creating Destination Directory F:HP6910pDailyBackupDesktop_New1Scripts
The system cannot find the file specified.
Waiting 30 seconds… Retrying…

What is causing this and how do I fix it?

I have tried changing the destination path but that fails also.

I have other laptops that are running this same script to the same network drive(different folders on the drive) and they are all working fine.

Any help would be great.

Below is the code that is in a file named backup.bat. Text version is attached.

echo %Date% %time%
@echo on
echo ==================================================:  %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

rem cleanup the harddrive
echo Disk Cleanup Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
c:windowssystem32cleanmgr.exe /dc /sagerun: 1

c:
cd
cd c:windowsprefetch
del *.* /q
c:
cd

IF NOT EXIST F:NUL goto NOT_EXIST
ECHO DRIVE F: IS READY >> C:UserspardoneDesktopScriptsBackUpLog.txt
@ping 127.0.0.1 -n 2 -w 12000 > nul
echo Disk Cleanup Completed: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

cd C:UserspardoneDesktopScripts

echo BackUp Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo Log Files Are Located At F:HP6910pDailyBackupLogs >> C:UserspardoneDesktopScriptsBackUpLog.txt

rem shutdown outlook, communicator and firefox
taskkill /im outlook.exe /F
echo Mircosoft Outlook Shutdown: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

taskkill /im communicator.exe /F
echo Mircosoft Communicator Shutdown: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

taskkill /im firefox.exe /F
echo Firefox Shutdown: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

@ping 127.0.0.1 -n 2 -w 12000 > nul

echo PST Copy Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
robocopy «C:PST» «F:HP6910pDailyBackupPST» /MIR /COPY:DT /FFT /MT:50 /LOG:BackUpLogPST.txt
robocopy «C:UserspardoneDesktopScripts» «F:HP6910pDailyBackupLogs» BackUpLogPST.txt
rename F:HP6910pDailyBackupLogsBackUpLogPST.txt BackUpLogPST_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt
del «C:UserspardoneDesktopScriptsBackUpLogPST.txt»
echo PST Copy Completed: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo Details are in BackUpLogPST_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt Located @ F:HP6910pDailyBackupLogs >> C:UserspardoneDesktopScriptsBackUpLog.txt

echo Outlook Copy Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
robocopy «C:UserspardoneAppDataLocalMicrosoftOutlook» «F:HP6910pDailyBackupOutlook» /MIR /COPY:DT /FFT /MT:50 /LOG:BackUpLogOutlook.txt
robocopy «C:UserspardoneDesktopScripts» «F:HP6910pDailyBackupLogs» BackUpLogOutlook.txt
rename F:HP6910pDailyBackupLogsBackUpLogOutlook.txt BackUpLogOutlook_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt
del «C:UserspardoneDesktopScriptsBackUpLogOutlook.txt»
echo Outlook Copy Completed: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo Details are in BackUpLogOutlook_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt Located @ F:HP6910pDailyBackupLogs >> C:UserspardoneDesktopScriptsBackUpLog.txt

start «» «C:Program Files (x86)Microsoft OfficeOFFICE14outlook.exe»
echo Mircosoft Outlook Application Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

start «» «C:Program Files (x86)Microsoft Lynccommunicator.exe»
echo Mircosoft Communicator Application Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

echo Desktop Copy Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
robocopy «C:UserspardoneDesktop» «F:HP6910pDailyBackupDesktop_New1» /MIR /COPY:DT /FFT /MT:50 /LOG:BackUpLogDesktop.txt
robocopy «C:UserspardoneDesktopScripts» «F:HP6910pDailyBackupLogs» BackUpLogDesktop.txt
rename F:HP6910pDailyBackupLogsBackUpLogDesktop.txt BackUpLogDesktop_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt
del «C:UserspardoneDesktopScriptsBackUpLogDesktop.txt»
echo Desktop Copy Completed: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo Details are in BackUpLogDesktop_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt Located @ F:HP6910pDailyBackupLogs >> C:UserspardoneDesktopScriptsBackUpLog.txt

echo My Documents Copy Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
robocopy «C:UserspardoneMy Documents» «F:HP6910pDailyBackupMy Documents» /MIR /COPY:DT /FFT /MT:50 /LOG:BackUpLogDocuments.txt
robocopy «C:UserspardoneDesktopScripts» «F:HP6910pDailyBackupLogs» BackUpLogDocuments.txt
rename F:HP6910pDailyBackupLogsBackUpLogDocuments.txt BackUpLogDocuments_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt
del «C:UserspardoneDesktopScriptsBackUpLogDocuments.txt»
echo My Documents Copy Completed: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo Details are in BackUpLogDocuments_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt Located @ F:HP6910pDailyBackupLogs >> C:UserspardoneDesktopScriptsBackUpLog.txt

echo Favorites Copy Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
robocopy «C:UserspardoneFavorites» «F:HP6910pDailyBackupFavorites» /MIR /COPY:DT /FFT /MT:50 /LOG:BackUpLogFavorites.txt
robocopy «C:UserspardoneDesktopScripts» «F:HP6910pDailyBackupLogs» BackUpLogFavorites.txt
rename F:HP6910pDailyBackupLogsBackUpLogFavorites.txt BackUpLogFavorites_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt
del «C:UserspardoneDesktopScriptsBackUpLogFavorites.txt»
echo Favorites Copy Completed: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo Details are in BackUpLogFavorites_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt Located @ F:HP6910pDailyBackupLogs >> C:UserspardoneDesktopScriptsBackUpLog.txt

echo Firefox Copy Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
robocopy «C:UserspardoneAppDataRoamingMozillaFirefox» «F:HP6910pDailyBackupFirefox» /MIR /COPY:DT /FFT /MT:50 /LOG:BackUpLogFirefox.txt
robocopy «C:UserspardoneDesktopScripts» «F:HP6910pDailyBackupLogs» BackUpLogFirefox.txt
rename F:HP6910pDailyBackupLogsBackUpLogFirefox.txt BackUpLogFirefox_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt
del «C:UserspardoneDesktopScriptsBackUpLogFirefox.txt»
echo Firefox Copy Completed: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo Details are in BackUpLogFirefox_%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt Located @ F:HP6910pDailyBackupLogs >> C:UserspardoneDesktopScriptsBackUpLog.txt

rem start «» «C:Program Files (x86)Mozilla Firefoxfirefox.exe»
rem echo Firefox Application Started: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

echo BackUp Finished: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
echo ==================================================:  %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt

:NOT_EXIST
rem echo BackUp Did Not Run: %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
rem Echo DRIVE F: IS NOT READY >> C:UserspardoneDesktopScriptsBackUpLog.txt
rem echo ==================================================:  %Date% %time% >> C:UserspardoneDesktopScriptsBackUpLog.txt
rem GOTO END

:END

Backup.txt

  • Robocopy ошибка 1314 клиент не обладает требуемыми правами
  • Robocopy ошибка 123 0x0000007b
  • Robocopy ошибка 0 0x00000000
  • Roblox что значит ошибка 279
  • Roblox произошла неизвестная ошибка пожалуйста попробуйте еще раз