Batch Script: Open File with Notepad
Question by Guest | Last update on 2021-05-12 | Created on 2017-06-26
I would like to write a small batch script for Windows that automatically opens a text file (or multiple text files at once) via the text editor of Windows (Notepad).
Is there any command available for this, but I can use? Thank you very much!
Related Topics
Batch Script: Open multiple Files simultaneously without waiting
Question | 1 Answer
PHP: File Download Script
Tutorial | 0 Comments
How to resize Image before Upload in Browser
Tutorial | 13 Comments
Windows Batch Script: Computer Shutdown
Tutorial | 0 Comments
jQuery: Submit complete form and receive content with Ajax
Tutorial | 0 Comments
jQuery: Send HTML5 Canvas to Server via Ajax
Tutorial | 0 Comments
Rewrite Text Files with a fixed Line Length
Tutorial | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
You can use the following line for opening a file with the Windows Editor / Microsoft Notepad in your batch script:
With this, the passed file will be opened and the script will wait until you have closed the editor.
If the script should not wait, you can write "start" at the start of the line. Then, the file will be opened and the script will continue without waking:
Using this command, you can also open multiple files at the same time:
This will open the files file1.txt, file2.txt and file3.txt simultaneously in 3 different windows of Notepad. After that, the script will be closed without waiting for one of the windows. If you omit the "start", the script would open all files after each other.
2017-06-27 at 11:35