This is what I would like to achieve: I have a piece of software that stores logfiles in random amounts of time (you never know when) in a directory. Now what I would like to achieve is writing a .bat file that keeps running in the background and keeps monitoring this directory. Then, when a new logfile gets created, it must open this file immediately (i.e: the latest file, or in other words the file with the most recent modify timestamp)
Does anyone know how to do this? I already achieved to open the most recent file but then I have to keep running the .bat file over and over again. I want to automate this process, so when a new file gets created, it opens it automatically.
Thanks in advance for your help.