"Offering free computer help, hints, and tips to the Internet populace." Now with over 3,820 tips!

Windows XP and WordPad

Execute from a Batch File

SUMMARY: Two ways to run WordPad from a batch file - one complicated, one not.

There may be times where you want to run WordPad in a batch file from the Windows XP DOS prompt. For example, you may want to open WordPad to display a TXT or RTF (Rich Text Format) file, perhaps as documentation for the batch file.

While you may think executing wordpad at the DOS prompt followed by the name of the file should work, this fails. One way to run this application is to enter the full path to the WordPad executable, surrounded by quotes:

"C:\Program Files\Windows NT\Accessories\wordpad"

OR save a few keystrokes and take advantage of that fact that a long time ago, WordPad replaced a Windows applet called Write. For backward-compatibility, you can still execute Write to get to WordPad, so just enter the following at the DOS prompt to open WordPad indirectly:


For example, to open WordPad with the file c:\droprights\eula.rtf, enter this command:

write c:\droprights\eula.rtf

Return to the Windows XP and WordPad page.

Print this tip

Get the Newsletter

blog comments powered by Disqus

Thanks For Sharing!

Newest Tips:

Windows 8
Make it Easier to Differentiate Explorer Windows by Showing Full Paths
Google Chrome
Easily Share Content on Facebook, Pinterest, Twitter, More
Windows 8
Speed up Your Taskbar Thumbnail Previews
General Computers
[MODIFIED] Why Do Install Programs Ask Me to Close Everything or Restart?

Follow Us!

About MalekTips and the Author

The MalekTips website was created in 1998 by Andrew Malek of Envision Programming. The page's goal is to freely disperse computer-related tips, hints, and informative articles. Tips are organized to be easy to find, and are presented clearly, in easy-to-understand language. MalekTips also provides information and links to public-domain, open source, freeware, shareware, and commercial software available for download.