@echo off setlocal rem This might need to be changed to match your system. set _cygdir_=c:\cygwin rem Use the for command to get the cygwin equivalent. for /f "tokens=*" %%c in ('%_cygdir_%\bin\cygpath %1') do @set _cygpath_=%%c rem Launch a cygwin bash there, have it cd, and then leave us with a shell. %_cygdir_%\bin\bash.exe --login -i -c "cd '%_cygpath_%' && exec /bin/bash"