I have a batch file that triggers process in Access database. I'd like to write into a log file (just some *.txt file saved in the same folder) time when before the process started and after it was finished. Is there a command for that? Thank you in advance

  • 3
    What operating system are you on? The solution is simple, but will depend what system you're on. Also, there are many questions similar to this you should search for first.
    – root
    Sep 18 '14 at 17:54

Using > and >> outputs to a file.


echo Hello World > hi.txt

Will result in a file called hi.txt containing the string "Hello World"

echo How are you >> hi.txt

Will add the line "How are you" to the end of hi.txt

This works on both Windows and Unix based OS. (Linux, Mac OS...)

On windows, using %TIME% or %DATE% in the echo string will output time/date as part of the string.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.