tags:

views:

24

answers:

1

I am working with a batch file that is being use to copy files from several remote servers to one central repository using robocopy. I am trying to zip the contents of the folder and then copy it but robocopy then returns the message:

"Warning: name not matched: z:\ExamplerServer\folder1 Error: No files were found for this action that match your criteria - nothing to do. (z:\ExampleServer\folder1\ExampleServerDailyBackup.zip)"

I am able to copy zipped files from other folders with out a problem....what is the reason that robocopy isn't able to find the newly created zip file for copy? Any help on this will be greatly appreciated.

here is a snippet of the batch file:

@echo off

::set logging path w/date stamp
set log="y:\Backup Logs\%%adaily-%date:~4,2%-%date:~7,2%-%date:~10,4%.log"

::using txt file for list of port servers to backup
for /f "tokens=* delims= "  %%a in (ExampleServers.txt) do (

  ::mapping source and destination paths
  net use z: \\%%a\d$ 
  net use y: "\\ExampleServer\folderA\folder B"
  z:
  ::robocopy file copy parameters
  wzzip -ex z:\folder1\%%aDailyBackup.zip z:\folder1
  robocopy z:\folder1\ y:\%%a /Z /R:1 /LOG:%log%
  wzzip -ex -s -ycAES128 y:\%%a\%%aDailyBackup.zip y:\%%a
  c:
  ::delete mapping after each file copy
  net use z: /delete
  net use y: /delete
)

exit
+1  A: 

I expect that your zip process hasn't completed by the time that you task robocopy with its work. You'll need to add in a wait state.

ChrisBD
Hmmmm.....that doesn't seem to do the trick....
Wduncan