Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Windows XP, how does one open a file with its default application from the command line?

As far as I know, this should work from a command prompt or batch file:

start "path to my file"

Unfortunately in my case, this only opens a new command prompt window for most file types. (It does work for .exe file though...)

share|improve this question
up vote 10 down vote accepted

Try this.

START "" "path to my file"

The START command treats the first set of "" as the text to use for the title of the window, so just include an empty pair.

share|improve this answer

Don't use START. Just type the name of the file. readme.txt opens readme.txt in Notepad (or in whatever default .txt handler you have in place).

Note that if there are spaces in the name, you must handle them. A good way is to use double quotes. "read me.txt"

share|improve this answer
Under windows 7, you need the START command. – Gerrit Jun 17 '14 at 8:08
@Gerrit No, you don't. If the program in question is in your path and your default handlers are set up properly, all you have to do it provide the path and file name and it will open. – kmort Jun 17 '14 at 11:46
Nice one. Works for me. – Derek Morrison Feb 3 at 16:54
explorer "filename"

works for xp and other windows (95 or higher) If it does not work, you haven't associated that extention type with a program.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .