Liu Chang asked a very similar question to this one here, Linux equivalent of the Mac OS X "open" command.
Is there a windows equivalent for the Mac OS X \"ope
If you use cygwin (or git bash), here's a quick script hack. Change the EDITOR to be whatever you want:
#!/bin/sh
# open
EDITOR="exec subl.exe"
BROWSER="/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"
if [ -d "$1" ]; then
exec explorer.exe $(cygpath -w "$1")
elif [ -f "$1" ]; then
path=$(cygpath --windows "$1")
case "$1" in
*.xml) $EDITOR "$1";;
*.txt) $EDITOR "$1";;
*.html) "$BROWSER" "$path";;
file://*) "$BROWSER" "$path";;
http://*) "$BROWSER" "$path";;
https://*) "$BROWSER" "$path";;
esac
else
# TODO non-existent file/dir
echo "non existent file: $1"
exit 1
fi
exit 0