In as simple a way as possible I am wondering if anyone knows how to archive .log files in a Windows XP directory by simply naming them with the current “localtime()” as part of the file name? (Do not assume there is a lock on the log file.) I tried all kinds of different ways of doing this but couldn’t solve it… and there are no good examples on the web.
Here is what I am looking for:
for (all files > that 1 day old)
rename file to file.[datestamp].log
end
Well, this looks so easy, I’m probably misunderstanding something. The task is to move for example “yada.log” to “yada.2011-05-04.log”? Then how about this: