|
Answer» What I need in a sense is to have a batch file open notepad and save it in a directory? Is it possible to have this task repeated daily?open notepad and save it in a directory? how do you mean..
start notepad.exe will open notepad.. what is it you want to save though?I want the batch file to just save a txt doc into a directory... nothing on the txt at all... just like if you were to open notepad and just save an untitled to MyDocs... It's a really out there QUESTION with no real purpose behind it. I just want to know if it can be done and how. Thank you for your immediate response.no problem and yea if you TYPE 00>mytext.txt it will create a txt file called mytext the 00 part can be anything, and is only their to complete the syntax.. the result will be it saying "00" is not recognized as an internal or external command, operable program or batch file but in the directory it was typed you will find a file called mytext.txt , if you wanted to add information to this document.. say from typing DIR as an example , use two > INSTEAD of one , or it will just re-create the text file.. so dir >>myfile.txtThanks a lot!! You have been a real help!echo. > myfile.txt will create a file with a CR/LF in it and nothing else, so basically an empty file is created. if you wanted it in a subdirectory you could do something like
echo. > c:\temp\tmp\myfile.txt
a single > will create a new file overwriting anything in the old file if it previously existed. a DOUBLE >> will append the new text to the end of the file if it exists.
D.
|