Windows equivalent of the Mac OS X “open” command

前端 未结 9 1348
轮回少年
轮回少年 2021-02-05 08:25

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

9条回答
  •  情书的邮戳
    2021-02-05 09:07

    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
    

提交回复
热议问题