I use
BRC (command-line version) to do something like that.
I "control" the originating file name.
(It is always the same.)
I also "control" when the file gets written.
(And in that way, "I" know it needs to be renamed. Actually it's simply a batch file-like operation.
Write "name" out to specific directory, then [automatically at that point], rename it [in a numerically increasing manner].)
- Code: Select all
C:\BRC32.exe /DIR:c:\tmp /PATTERN:xxx_out.txt /REMOVENAME /FIXEDNAME:%date:~8,2%%date:~0,2%%date:~3,2%.%time:~0,2%%time:~3,2%.%time:~6,2% /NODUP /EXECUTE
In this case the "originating file name" is "xxx_out.txt" (which is output into the c:\tmp\ directory).
Then I remove the name, entirely, replacing it with (in this case) a file named to the current date/time/sec.
So
something can be done.
My setup is rather controlled, so rather easy.
Something more diverse, I'd think you'd have to run BRC, periodically to look for the file to rename (& if existent, do so...).
Sample output names, YY MM DD . HH MM . SS:
- Code: Select all
230908.1409.27.txt
230908.1407.07.txt
230908.1405.13.txt
230731.1402.52.txt