On Mac OS X and GNOME on Linux, there are commands that can be used to open files from the command line in their associated GUI editors:
gnome-open, respectively. Is there any command like this for Windows?
If you are currently in the command prompt and have a file called
If you are at the directory (so should say
which would open test in the default png picture editor.
If the files name contains spaces, then simply enclose the file name within " "
You can alternatively type:
which will open the file no matter where you currently are.
Finally, you can pass the picture to another program. For example, if you have an image editor called imageedit.exe and it supports opening files through command lines (and if the program is pathed/accessible or you are in it's current directory), you can type the following:
This may come a bit late, but the correct command for editing a file name in Windows 7 is "write file_name"
This should open up the default text editor and you should be able to edit the file easily
Edit: It seems to open only Wordpad. For me that was the default text editor.
If you run the following command
It uses powershell and passes the string in as a command. Just using the file path will open the item. No sense in passing in anything fancy per this.
Simple and versatile.
In the Windows command prompt, you can run
in order to view batch files/logs/text files etc. This command requires
See here for other useful MS-DOS commands.