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 = "[email protected]:/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.

1 Answer 1

6

Because you named your bat file rsync.bat

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

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .