Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Delete expired files under windows

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Write a del.bat script on window server and put the following command in it

Forfiles / p D:\ backup-80-61\ 80-svn\ mmxd\ / m * .tar.gz / d-15 / c "cmd / c del @ file"

Forfiles / p D:\ backup-80-61\ 61-mms2\ backup\ / m * .tar.gz / d-15 / c "cmd / c del @ file"

Forfiles / p D:\ backup-80-61\ 61-mms2\ backup\ / m * .sql / d-15 / c "cmd / c del @ file"

The above is the regular deletion of three different file directories of the files, only save the files for 15 days.

In addition, we are working on a scheduled task to delete log files in the early hours of every morning.

If you need to deploy this command to the XP system, you can directly go to window 2003Universe 2008 or copy in the win7 system to use it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report