Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows equivalent of the Mac OS X “open” command

Tags:

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 "open" command. I'm trying to run a profiler that will open it's results, but it's looking for the "open" command. Basically, the command needs to open a file from the command prompt as if it were double-clicked on in explorer.

like image 634
jcnnghm Avatar asked Feb 01 '09 18:02

jcnnghm


People also ask

What is the equivalent of open in Windows?

'start' is definitely the closest thing for Windows as @charles-duffy stated.

What is the equivalent of Mac Terminal in Windows?

The closest built-in equivalent is cmd.exe . It is, however, not a bash shell: the command set is very different. If you specifically need bash , you could install Cygwin.

What is the Open command on Mac?

The open command opens a file (or a folder or URL), just as if you had double-clicked the file's icon.


1 Answers

The closest thing available is start.


If its first argument is double-quoted, that argument is treated as a window title rather than a filename. Thus, to use it robustly, add an empty string as the first argument:

start "" "my filename.foo" 

Thank you to @Holger for pointing this out!

like image 108
Charles Duffy Avatar answered Sep 30 '22 17:09

Charles Duffy