Robocopy ошибка 2 0x00000002

  • 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 \\xx\xx\x\~$xxxx.xlsx The system cannot find the file specified.

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

Answers

    • Marked as answer by

      Tuesday, April 8, 2014 9:47 AM

  • 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 «\\XX\IT» «D:\Backup\IT» /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 «\\XX\IT» «D:\Backup\IT» /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

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!

  • Home
  • Forum
  • Technical Support
  • Computer Help
  • Windows Server
  • Windows Server Help
  • Robocopy ERROR 2 (0x00000002)

  1. Robocopy ERROR 2 (0x00000002)

    Hi

    I am getting following error while copying data using Robocopy.

    «ERROR 2 (0x00000002) Time-Stamping Destination File Y:\file10112
    The system cannot find the file specified.»

    Above error does not have any effect on the copy operation and data gets copied correctly. MD5SUM of source and destination also matches.

    I have 25000 such files. Source as well as Destination Y:\ is a CIFS share.

    Please help to find cause behind this error.

    Thanks
    Anup


  2. Re: Robocopy ERROR 2 (0x00000002)

    Hello,

    Any chance you have an anti-virus running on the destination server?
    If so, can you try after (temporarily) disabling it?


    Marc [MCSE, MCTS, MVP]
    [Heureux celui qui a pu pénétrer les causes secrètes des choses]
    [Blog: http://www.marc-antho-etc.net/blog/]

    «getannupalways» <getannupalways.3mzcnb@DoNotSpam.com> wrote in message
    news:getannupalways.3mzcnb@DoNotSpam.com…


    >
    > Hi
    >
    > I am getting following error while copying data using Robocopy.
    >
    > «ERROR 2 (0x00000002) Time-Stamping Destination File Y:\file10112
    > The system cannot find the file specified.»
    >
    > Above error does not have any effect on the copy operation and data
    > gets copied correctly. MD5SUM of source and destination also matches.
    >
    > I have 25000 such files. Source as well as Destination Y:\ is a CIFS
    > share.
    >
    > Please help to find cause behind this error.
    >
    >
    > Thanks
    > Anup
    >
    >
    > —
    > getannupalways
    > ————————————————————————
    > getannupalways’s Profile:
    > http://forums.techarena.in/members/getannupalways.htm
    > View this thread:
    > http://forums.techarena.in/windows-s…lp/1114023.htm
    >
    > http://forums.techarena.in
    >


  3. Re: Robocopy ERROR 2 (0x00000002)

    Hi Marc,

    Thanks for the Reply. I don’t have anti-virus installed on the machine

    Thanks
    Anup


  4. RE: Robocopy ERROR 2 (0x00000002)

    I have exactly the same problem.
    Can i ignor the error 2 code or what?

    «getannupalways» wrote:


    >
    > Hi
    >
    > I am getting following error while copying data using Robocopy.
    >
    > «ERROR 2 (0x00000002) Time-Stamping Destination File Y:\file10112
    > The system cannot find the file specified.»
    >
    > Above error does not have any effect on the copy operation and data
    > gets copied correctly. MD5SUM of source and destination also matches.
    >
    > I have 25000 such files. Source as well as Destination Y:\ is a CIFS
    > share.
    >
    > Please help to find cause behind this error.
    >
    >
    > Thanks
    > Anup
    >
    >
    > —
    > getannupalways
    > ————————————————————————
    > getannupalways’s Profile: http://forums.techarena.in/members/getannupalways.htm
    > View this thread: http://forums.techarena.in/windows-s…lp/1114023.htm
    >
    > http://forums.techarena.in
    >
    >


  5. RE: Robocopy ERROR 2 (0x00000002)

    I have exactly the same problem!
    Can I ignore the Error 2 code or what?

    «getannupalways» wrote:


    >
    > Hi
    >
    > I am getting following error while copying data using Robocopy.
    >
    > «ERROR 2 (0x00000002) Time-Stamping Destination File Y:\file10112
    > The system cannot find the file specified.»
    >
    > Above error does not have any effect on the copy operation and data
    > gets copied correctly. MD5SUM of source and destination also matches.
    >
    > I have 25000 such files. Source as well as Destination Y:\ is a CIFS
    > share.
    >
    > Please help to find cause behind this error.
    >
    >
    > Thanks
    > Anup
    >
    >
    > —
    > getannupalways
    > ————————————————————————
    > getannupalways’s Profile: http://forums.techarena.in/members/getannupalways.htm
    > View this thread: http://forums.techarena.in/windows-s…lp/1114023.htm
    >
    > http://forums.techarena.in
    >
    >


Similar Threads

  1. Replies: 3

    Last Post: 03-01-2014, 12:09 PM

  2. Replies: 4

    Last Post: 02-01-2014, 10:32 AM

  3. Replies: 3

    Last Post: 31-12-2013, 10:41 AM

  4. Replies: 7

    Last Post: 01-02-2011, 04:10 PM

  5. Replies: 5

    Last Post: 15-05-2007, 08:31 AM

Tags for this Thread

Bookmarks

Bookmarks


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
  • BB code is On
  • Smilies are Off
  • [IMG] code is Off
  • [VIDEO] code is Off
  • HTML code is Off

Forum Rules

Get the Reddit app

Scan this QR code to download the app now

Or check it out in the app stores


Go to sysadmin


r/sysadmin


r/sysadmin

A reddit dedicated to the profession of Computer System Administration.




Members





Online



by

Apprehensive_Gur_36



ROBOCOPY ERROR 2 (0x00000002) Copying NTFS Security to Destination File

[removed]

Sorry, this post was removed by Reddit’s spam filters.

Archived post. New comments cannot be posted and votes cannot be cast.

Понравилась статья? Поделить с друзьями:
  • Robocopy ошибка 0 0x00000000
  • Riello ups ошибка a61
  • Riello ups коды ошибок
  • Ricoh список ошибок
  • Robocopy коды ошибок