gisvpn
asked on
Batch file to add string to a TEXT file
Hello i would like a batch file which when run will insert a little bit of text and the current time and date..
If possible i would like this to append to any other text already in the text file and have a break on each insert of text.
The name of the text file is log.txt
Many thanks
Ollie
If possible i would like this to append to any other text already in the text file and have a break on each insert of text.
The name of the text file is log.txt
Many thanks
Ollie
and this
date /T >> log.txt
time /T >> log.txt
date /T >> log.txt
time /T >> log.txt
ASKER
Thanks,
I have used the following in a single batch file.
date /T >> log.txt
time /T >> log.txt
echo MS04-007 >> log.txt
echo -END- >> log.txt
The output in the file is
Wed 24/03/2004
18:41
MS04-007
-END-
Can i get this all on one line ?????
Thanks
I have used the following in a single batch file.
date /T >> log.txt
time /T >> log.txt
echo MS04-007 >> log.txt
echo -END- >> log.txt
The output in the file is
Wed 24/03/2004
18:41
MS04-007
-END-
Can i get this all on one line ?????
Thanks
@echo *******************>>c:\te stfile.txt
time /t >>c:\testfile.txt
@echo *******************>>c:\te stfile.txt
time /t >>c:\testfile.txt
@echo *******************>>c:\te
no, its
each %date% %time% string >> log.txt
each %date% %time% string >> log.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
yeah what xassets said :)
echo mystring >> log.txt
??