简体   繁体   中英

Not able to robocopy single file from Windows XP SP3 workstation

Hi Robocopy Specialists, I am not able to transfer a backup file to server using robocopy from Windows XP SP3 workstation with the following batch file:

@echo off
………..
set "LOCAL_BACKUP_PATH=H:\Backup\%LOCALDATESTAMP%"
set "REMOTE_BACKUP_PATH=X:\Backup\%REMOTEDATESTAMP%"
md "H:\Backup\%DATESTAMP%" 2 > nul
rem "%ProgramFiles%\7-Zip\7z.exe" a -tzip "%LOCAL_BACKUP_PATH%\%BACKUP_FILE%" "H:\Backup\%LOCALDATESTAMP%\Images.db" "H:\Backup\%LOCALDATESTAMP%\Images.log" >> "H:\Backup\blog.txt"
c:\robocopy\robocopy.exe "%LOCAL_BACKUP_PATH%" "%REMOTE_BACKUP_PATH%" "%BACKUP_FILE%" /COPY:DATS /w:1 >> "H:\Backup\blog.txt"

Below is the robocopy output:

----------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows     ::     Version XP010
----------------------------------------------------------------------------
  Started : Thu Dec 29 18:00:22 2017
   Source = H:\Backup\171229_1800\
     Dest : X:\Backup\171229\
    Files : Backup_171229180022.zip
  Options : /COPY:DATS /R:1000000 /W:1 
----------------------------------------------------------------------------
NOTE: NTFS Security may not be copied - Source may not be NTFS.
                       0    H:\Backup\171229_1800\
----------------------------------------------------------------------------
                Total    Copied   Skipped  Mismatch    FAILED    Extras
     Dirs :         1         0         1         0         0         0
    Files :         0         0         0         0         0         0
    Bytes :         0         0         0         0         0         0
    Times :   0:00:00   0:00:00                       0:00:00   0:00:00
    Ended : Thu Dec 29 18:00:22 2017

This setup has worked when transferring from a Windows 7 Pro w/s to the same server where source folder is from NTFS volume ( Robocopy kept adding backslash in Windows 7 batch script ).

Below are differences between Windows 7 Pro setup to this one:

  1. Workstation on Windows XP SP3 is the source folder is a FAT32 volume (H:). I have removed the S flag (from /COPY:DATS to /COPY:DAT) which eliminates the need to copy NTFS security attributes but still no backup file been transferred.
  2. Use an alternative source folder from a NTFS volume (D:) also not able to transfer the same backup file either.
  3. No need for compression done by vendor application backup.
  4. Use an old C:\\Robocopy\\ROBOCOPY.exe as opposed to Windows 7 Pro native C:\\Windows\\Systems32\\ROBOCOPY.EXE.

I ran out of ideas and would appreciate your expert advice. Thanks again, George

Robocopy displays the output correctly. Your robocopy output says that it has not found a file with this name and that's why no file is copied.

            Total    Copied   Skipped  Mismatch    FAILED    Extras
 Dirs :         1         0         1         0         0         0
Files :         0         0         0         0         0         0

Make sure this file exists before you commit Robocopy to copy anything. Otherwise give a message in your log file that this file does not exist.

if exist "%LOCAL_BACKUP_PATH%\%BACKUP_FILE%" (
  robocopy ...
) else >> "H:\Backup\blog.txt echo "%LOCAL_BACKUP_PATH%\%BACKUP_FILE%" not found.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM