How to get rid of the backup files on the servers and workstations?


hi there,

i tried, reason couldn't found answer. how setup security fixes , updates wsus backup files (under c:\windows\...) not gerated. or @ least removed after time period?

--
petri

you run script ( credits goes "interactivemind" )


@echo off
setlocal enabledelayedexpansion

set folder_to_process=c:\directory\sub_directory\my_scripts
set leave_most_recent=4

if not exist "%folder_to_process%" (
   echo cannot locate specified folder: %folder_to_process%
   echo please update script , try again.
   echo.
   echo press key exit . . .
   pause>nul
)
cd /d "%folder_to_process%"
set count=0
for /f "delims=" %%i in ('dir /o:-d /b') call :process "%%i"
echo complete.
set errorlevel=0
goto :eof
:process
set /a count+=1
if %count% leq %leave_most_recent% exit /b
del %1 /f >nul
exit /b

just change "set folder process" and  "set leave..." config.



Windows Server  >  WSUS



Comments

Popular posts from this blog

DCOM received error "2147746132" from...

ADFS 3.0 Event ID 4625 | An Error occurred During Logon | Status: 0xC000035B

DFSR RPC replication errors 5014 1726 with large files over VPN