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: open and gnome-open, respectively. Is there any command like this for Windows?

link|improve this question

@badp: I mentioned "GNOME on Linux" not just Linux. – Wuffers Feb 17 '11 at 2:33
Whoops, sorry. – badp Feb 17 '11 at 2:34
@badp: No worries. ;) – Wuffers Feb 17 '11 at 2:35
feedback

2 Answers

up vote 3 down vote accepted

If you are currently in the command prompt and have a file called test.png and , which are located in c:\test you can do the following:

If you are at the directory (so should say c:\test>) just type:

test.png

which would open test in the default png picture editor.

You can alternatively type:

c:\test\test.png

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:

 imageedit c:\test\test.png
link|improve this answer
feedback

If it is a registered extension, you can use "start" as in

start WordDoc.doc
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.