0

I've created a .bat file for running my cwRsync script.

From CMD line, this works great:

rsync -avz ./ {destination} --chmod=ugo=rwX --rsh "ssh -i id_rsync -p 9672" --recursive --delete

Now, If I put this in a .bat file, it just goes into a infinit loop. Thisi s my bat file:

@ECHO OFF
ECHO ** Pushing files **

SET CWLOCAL = "C:/dev/view-resources"
SET CWREMOTE = "user@mydevserver.com:/home/dev"
SET EXLUDES = "--exclude=.git* --exclude=*.scss --exclude=cache"

rsync -avz %CWLOCAL% %CWREMOTE% --chmod=ugo=rwX --rsh "ssh -i id_rds -p 9672" --recursive %EXCLUDES% --delete

Why is this .bat file looping? I've tried adding end at the end, but that is not helping.

6

Because you named your bat file rsync.bat

The command rsync -avz invokes rsync.bat not rsync.exe

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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