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

Is it possible to specify what action (run/open/edit) I want to execute on a given file in the command line window? If so how?

share|improve this question

Use the DOS command assoc to modify the file extension associations. Do

assoc /?

to see the help for it.

share|improve this answer


Run/Open: file or start file
Edit: notepad file

Linux (Gnome environment)

Run: ./file.
Edit: gedit file (for text files)
Open: gnome-run file

Replace file by the filename.

share|improve this answer
The OP tagged it "Windows".... – Ned Batchelder Sep 4 '11 at 16:11
Oops. ------------- – RobinJ Sep 4 '11 at 16:22
So why the -1 then? – Canadian Luke Sep 4 '11 at 17:32

You must log in to answer this question.

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