I am trying to write a simple batch script that renames, moves and stores crash log files of a program. The log files are named using date stamp and time stamp so the end result is a folder with many log files with different date/time stamps. I want then to list the content of this folder in a list. I am able to do the following:
dir /b >> list.txt
The problem is with this method it lists alla the files in the folder every time a new log file is created. For example, I have the following log files in a folder:
log1
log2
log3
and after the program crashes a new log file is created log4
, when the script is run the list shows the following:
log1
log2
log3
log1
log2
log3
log4
Is there any way to append only the new log files to my list?