1.

Solve : BAT LOG FILE?

Answer»

hi im TRYING to log all the results in a bat file but i cant get it right anyone can help me pls

echo off
:START
echo Computer Name: %computername%
IPCONFIG
pause
cd \
cd Program Files\Kaspersky Lab\NetworkAgent
cls
klmover -address 192.168.0.234
echo.>>BackupLog.txt
pause Quote from: custodian on August 05, 2008, 04:06:48 AM

echo.>>BackupLog.txt

I'll GIVE you a hint, you're creating backuplog.txt if it doesn't exist and TELL it to create a new LINE. Here is another hint, echo.>>Backuplog.txt  will just create a blank text file called Backuplog.

Another hint on top of that, if you do echo. Hello>>backuplog.txt, you will get a text file with the word Hello in it.and another hint

> creates the file if it does not exist, and overwrites the file if it does exist.

>> creates the file if it does not exist, and appends to the file if it does exist.

Crucial difference.



Discussion

No Comment Found