|
Answer» How can i let a bat file show which date it has been used for the LAST time?
if this is possible, please post a sample! yes, you can, you simply have it make a TEXT file every time it is opened; that it can read the file each time it is opened, then edit it when it is finished.....fireballs should be able to make a code. i am not familiar with f/ tokensecho %date% %time% >>"C:\temp.txt"
I'm sure there are better ways, but that is just something I thought of. Basically, add that to the start of your batch file and it will add the date and time to the text file every time the batch file is opened.Homework again ?
Code: [Select]@echo off
if exist TMP for /F "tokens=1,2 delims=;" %%a in (TMP) do ( echo.Last Used: %%a %%b )
echo %date%;%time%>TMP
pause >nulit works but after i opened it again it showed the date and time twice on the screen it works for me
Code: [Select]Last Used: 2008-09-21 13:13:24,94 You get every time STAMP by using :- echo %date% %time% >>"C:\temp.txt"
You get the latest time stamp only by using :- echo %date% %time% >"C:\temp.txt"
Regards Alan Solved the problem!
thanks
|