Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am working with a batch file that is being used to copy files from several remote servers to one central repository using robocopy. I am trying to zip the contents of a 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

share|improve this question
    
I love bat files :) Please, use <br> in your problem description at the end of the lines to separate them. See the result in preview box before posting. –  kokbira Jul 14 '10 at 17:08
    
Use "echo.something to show %variable%" command to "debug" your bat, and "pause" to do it step-by-step. –  kokbira Jul 14 '10 at 17:14

1 Answer 1

I was able to find the fly in the ointment. the problem was with where I was trying to have robocopy copy the .zip file from. It turns out that I was telling robocopy to try calling from one level too deep.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.