I have built a batch file that when opened adds current date and time to an external text file with the commands:
echo %date% %time% >> flexiLog.txt
Every time the batch runs a new line containg date and time is added to the text file as dd/mm/yyyy hh:mm:ss. It works fine. However, I would also like the same batch file to read the content of the last line in that text file before adding a new line. In particular if the date in the last line is different than the current date, then a blank line should be added before the new entry.
Is it possible? how do I retrieve the date from the text file and compare it with the current date?