Posts

Showing posts from March, 2019

Script to delete the files older then 2 days from All Available Drives On Servers:\AnyDirectory

Image
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