Thursday, August 27, 2009

Launch Explorer.exe from Cygwin

Working in cygwin, I often need an explorer window to my current directory or a sub-directory there of. I called this script expl.sh.
#!/bin/bash
export p=`pwd`
export pc=`cygpath -w $p/$1`
explorer.exe /root,$pc &
Once you have this the directory on your path where you keep your scripts: perhaps ~/scripts:
expl.sh
expl.sh some/sub/directory

1 comment:

Anonymous said...

I noticed if you type a capital "L" that it will bring up the CYGWIN spawned explorer.exe window.

This can be annoying since it happens anytime you type cap-L