@echo off setlocal rem Define base folder to Processing set TopLevel=E:\owlTcpXfer\server\download5000-all rem process each folder contained in base folder for /d %%t in ("%TopLevel%\*.*") do ( rem Display folder currently being processed echo Processing '%%~t' ... rem remove files older than one day from this folder rem *** add /s option to pure old files in all subfolders as well *** forfiles /p "%%~t" /d -1 /c "cmd /c del /s @path" rem Remove any empty folders below thus user folder for /f "delims=" %%i in ('dir /s /b /ad "%%t" ^| sort /r') do (rd "%%~i" >NUL ) )
|Select menu in BATCH and then hit ENTER||36||63|
|Batch File to find and replace a string||15||103|
|how to split this type of line?||5||83|
|Searching File Names and Eliminating Duplicates in Windows||5||25|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
17 Experts available now in Live!