View Full Version : closing and saving a notepad file from the DOS prompt
Wouter
December 5th 03, 09:55 PM
Dear newsgroup,
I can open a particular notepad (.txt) file from the DOS
prompt.
I would like to close (and save) .txt files from the
command prompt as well. There does not seem to be a DOS
command that performs this task. Is there a workaround ?
Is it possible to send a wm_close message to the window
from the DOS prompt, and a wm_keydown message to
the "&Yes" button (to save). Can anyone provide an example
of how this may be accomplished ?
Best regards,
Wouter Vinck
Patrick
December 5th 03, 10:00 PM
Wouter wrote:
> Dear newsgroup,
>
> I can open a particular notepad (.txt) file from the DOS
> prompt.
> I would like to close (and save) .txt files from the
> command prompt as well. There does not seem to be a DOS
> command that performs this task. Is there a workaround ?
> Is it possible to send a wm_close message to the window
> from the DOS prompt, and a wm_keydown message to
> the "&Yes" button (to save). Can anyone provide an example
> of how this may be accomplished ?
>
> Best regards,
>
> Wouter Vinck
I may not be quite with you, but why not open your *.txt file with the
CommandPrompt (DOS) command 'EDIT'
I. E. edit C:\text.txt
Rob Schneider
December 5th 03, 10:00 PM
Wouter wrote:
> Dear newsgroup,
>
> I can open a particular notepad (.txt) file from the DOS
> prompt.
> I would like to close (and save) .txt files from the
> command prompt as well. There does not seem to be a DOS
> command that performs this task. Is there a workaround ?
> Is it possible to send a wm_close message to the window
> from the DOS prompt, and a wm_keydown message to
> the "&Yes" button (to save). Can anyone provide an example
> of how this may be accomplished ?
>
> Best regards,
>
> Wouter Vinck
>
Wouter,
Can you please elaborate on what you mean by "close and save" from
command prompt? What are you trying to automate?
vBulletin® v3.6.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.