3

I am trying to move from a mac environment to a windows one and require rsync.

Found cwrsync @ http://www.rsync.net/resources/howto/windows_rsync.html

I have installed the cwrsync program fine, I can call the rsync at cmd but on when in the directory which contains the sync.exe

When in command prompt, if i call rsync when not in the relavent directory it moans and sayS:

"rsync" is not recognised as an internal or external command, operable program or batch file.

Is there a way to add the rsync.exe to a global list so as rsync is recognised outside of its immediate parent directory?

Thanks, John

rsync not working.

  • For anyone who lands on this today.. years on i have learned (to not use windows) to just use cygwin instead of cwrsync and just install the rsync module into cygwin. https://www.cygwin.com –  Feb 13 '18 at 20:53

2 Answers2

8

Add the path in the Windows system variables:

- Control Panel -> System -> tab Advanced, button Environment Variables.
- Edit the "Path" system variable and add the full path to the installed rsync:
     C:\Program Files\cwRsync\bin or C:\cygwin\bin. or
     C:\Program Files (x86)\cwRsync\bin or C:\cygwin\bin.

This way the commands rsync and ssh should run from any directory. Make sure you put in the correct install path to the application else it won't work. See screenshot below:

Environment Variable Setup: Make sure the path you added is under System Variables:

enter image description here

Command: As seen, I am running this directly from root of C: drive

enter image description here

Chelseawillrecover
  • 2,596
  • 1
  • 31
  • 51
  • ok, i have created a system variable: "rsync" with value: "C:\Program Files\cwRsync\bin\rsync.exe". I have restarted the machine but no joy. Upon calling the rsync command outside of the directory holding the .exe file it still moans with the same message. –  Dec 10 '13 at 11:58
  • are you running a 64bit machine or 32bit? Also can you confirm the install location is Program Files or Program Files (x86) – Chelseawillrecover Dec 10 '13 at 12:03
  • Win7 pro 64bit sp1. The install location of rsync is: "C:\Program Files\cwRsync\bin\rsync.exe". –  Dec 10 '13 at 12:07
  • See my updates. This is no rocket science, it should work if you did it well – Chelseawillrecover Dec 10 '13 at 12:14
  • yea i did think so, please see my original post. I have followed your instructions but still no joy. i have attached a screenshot, can you see anything wrong with what i have implemented? –  Dec 10 '13 at 12:28
  • Ahhhh... i get it! I though that i had to create a brand new entry. Did not realise you had to add to the existing "path" variable. –  Dec 10 '13 at 12:33
0

cwRsync distribution contains a batch file example called cwrsync.cmd with correct path settings. You can simply add your rsync command into that file.

itefix
  • 66
  • 4