This tip was printed from the MalekTips Computer and Technology Help and Tips website at http://malektips.com.

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:

write

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

write c:\droprights\eula.rtf


 

 

Press the "print" button on your browser or select "File" - "Print" to print this tip. Then, return to Windows XP and WordPad - Execute from a Batch File

Standard disclaimer applies - read http://malektips.com/disclaim.html