Windows equivalent of the Mac OS X “open” command

2019-03-18 06:42发布

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.

9条回答
戒情不戒烟
2楼-- · 2019-03-18 07:29

if you're on xfce, and you have Thunar, you can run the command " Thunar . " to open graphically current folder

查看更多
Melony?
3楼-- · 2019-03-18 07:31

I use to write

explorer.exe <file>
查看更多
我欲成王,谁敢阻挡
4楼-- · 2019-03-18 07:32

I am answering this again as the accepted answer is not correct which is using the start command (which opens up the CMD as a new instance) and also because The Equivalent according to me is explorer.exe as also mentioned by others but not clarified as it should have been!

So, If you want to open the current folder like that with the 'open' command. you should use

explorer.exe .

which will open the current folder in explorer or if you just do the

explorer.exe 

then you will open the default This PC location (whether it is recents or my computer or anything else)

It just works as in, when you just type in the file name it will just open in the default program just like

somevideo.mp4

and if you want that file/video to open/play with some other program just write down the program name with the full path (if it's not in the PATH system variable) followed by the filename like

"C:\program files\greentree applications\vlc.exe" somevideo.mp4
查看更多
登录 后发表回答