将滚动文件移至另一个文件夹

发布于 2025-01-19 04:30:17 字数 193 浏览 4 评论 0原文

是否可以将旧文件移至其他文件夹?我将其设置为每天滚动,我想将当前的登录列入一个文件夹和较旧的日志中,以便更容易找到最新的文件。至少我希望最新的文件始终是同一名称,并且只有较旧的日志才能将日期添加到文件名中。

例如,当前文件应命名为log.txt和log log20220403.txt。我需要这个,因为我必须从命令行访问日志并拥有常数文件名可以简化很多内容。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文