<p>I'd like to run a long rsync command in Cygwin by double clicking on a .sh file in Windows.  It must start in the file's containing directory (e.g. /cygdrive/c/scripts/) so that relative paths work.  Anyone gotten this to work?</p>

<p>Note: I've just found <a href="http://web.archive.org/web/20121204091631/http://blog.chavez.ws:80/2008/03/cygwin-command-here.html" rel="nofollow noreferrer">here</a>, a Cygwin package that manages Windows context menus (Bash Prompt Here).  It might have some clues.</p>

One solution that works is to create a
```
.bat
```
file that will open cygwin and execute your script.
The script to execute the script
```
go.sh
```
located on my home directory:
```
```
@echo off

C:
chdir C:\cygwin\bin

bash --login -i ./go.sh
```
```