Script to delete the files older then 2 days from All Available Drives On Servers:\AnyDirectory
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYwdqx0R7f4YU6QP7D3Wd6MKPsxCHLcrnq34CD3Ry2OsEVtW5ezszoeXMMXNFT410K7cPsQSftx5ORqLv9DIJH6vJd7aNvfQVD5lbvSn_jmfBL11CkiBZxHgjH_u26N7CHOJL0XBc4F21U/s1600/TCBINSSHIVAM.png)
Script below can be used to delete the files which are older then 2 days from All Available Drives On Servers:\AnyDirectory. If you want to filter files with some particular extension please add the following handle to the script : /m (searchmask) Searches files according to the specified search mask. The default search mask is *.\*. More information about parameters and variables available can be found here @ECHO off Rem=================================================================================================================== Rem AUTHOR: SHIVAM KUMAR | https://www.linkedin.com/in/shivamkumars Rem VERSION: 1.0 Rem DESCRIPTION: Script to delete the files which are older then 2 days from "All_Available_Drives_On_Servers:\AnyDirectory" directory Rem How to use: Select the servers from hpsa and right click and run script,no user input is required. Rem Disclaimer: The script has to be run on proper timings after the backup or what ever patching activity else you m