Here's a batch script for deleting files older than 90 days. Because the files are on a UNC share, the pushd and popd commands need to be used to make Windows happy:
@echo off
rem Delete disk backups older than 90 days
echo Deleting old disk backups...
pushd \\192.168.10.250\Backups\
forfiles -m *.bak -d -90 -c "cmd /c del @path"
popd
echo Complete.
Thanks for posting this, i found this very helpful.
ReplyDeleteYes it works
ReplyDelete