On 10 Mar 00 at 23:31, Detailboy wrote:
> I'd like to create a .BAT file that will issue a DIR command for a
> directory so that it ECHOs to and appends to the same daily diary
> file and each day I run the .BAT it will append the DIR to the end
> of the same file so that when I want I can see what time the files
> were written each day over time.
DIR *.txt >> main.log
When you use double redirection ">>", it will append. With single
redirection ">" it will overwrite, so be careful.
Else, in three steps, using single redirection to temp file,
then append temp file to main file with copy command, then delete
temp file
DIR *.txt > temp.log
COPY main.log+temp.log main.log
DEL temp.log
You can insert path names in front of each file name in the above
commands to make certain you get it right in case you execute
the batch from a another directory (from anywhere as long as you
keep the batch in a directory on your path. Type SET to see your
current path environment).
Btw: see DIR /? for output options.
All the best,
Bjorn
To unsubscribe from SURVPC send a message to [EMAIL PROTECTED] with
unsubscribe SURVPC in the body of the message.
Also, trim this footer from any quoted replies.
More info can be found at;
http://www.softcon.com/archives/SURVPC.html