set LOG_ROOT=%1
if "" equ "%LOG_ROOT%"
set LOG_ROOT=C:/logs/applogs
if not exist %LOG_ROOT% exit 1
cd %LOG_ROOT%
copy nul blankfile
@echo off
for /R %%A in (*.log.*) do del %%A
for /R %%A in (*.log.*) do copy blankfile %%A
if exist blankfile del blankfile
@echo on