Move rolled files to another folder

147 Views Asked by At

Is it possible to move old files to some other folder? I have it set up to roll every day and I want to have current log in one folder and older logs from previous days in sub-folder so that it is easier to find the latest file. At the very least I would want the latest file to always be the same name, and only older logs should have date added to file name.

E.g., current file should be named log.txt and log from yesterday - log20220403.txt. I need this because I have to access logs from command line and having constant file name simplifies things a lot.

0

There are 0 best solutions below