Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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