10

How do i tell windows to open C:\test\test.txt in WordPad, when Notepad is my default program for .txt files?

4 Answers 4

18

The accepted answer didn't work for me. I am not sure if it was because of the program I was trying to run, or because the path had spaces in (even though I wrapped it in quotes), or something else.

Anyway, I was able to do it be adding an empty string after the start command.

For example:

start "" "C:\My Programs\myprogram.exe" "C:\My Files\myfile.txt"
Sign up to request clarification or add additional context in comments.

Comments

9

You can add the direct path to the executable like

start C:\Windows\System32\write.exe [FILE]

1 Comment

;) Works like a charm. I am using the batch to run a file in Java's compiler.
2

Try:

start wordpad c:\test\test.txt

Comments

0

There is no need to use start when using write.exe, so simply:

write [FILE(S)]

write.exe is located in C:\Windows\System32.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.