windows_batch_scripting
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
windows_batch_scripting [2015/08/04 20:16] – add "Get current time in a locale independent way" zertrin | windows_batch_scripting [2015/08/04 20:18] (current) – add "Delete folders older than 10 days" zertrin | ||
---|---|---|---|
Line 126: | Line 126: | ||
FOR /f %%a in ('WMIC OS GET LocalDateTime ^| find " | FOR /f %%a in ('WMIC OS GET LocalDateTime ^| find " | ||
set CUR_DATE=%DTS: | set CUR_DATE=%DTS: | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Delete folders older than 10 days ==== | ||
+ | |||
+ | from http:// | ||
+ | |||
+ | < | ||
+ | FORFILES /S /D -10 /C "cmd /c IF @isdir == TRUE rd /S /Q @path" | ||
</ | </ | ||
windows_batch_scripting.txt · Last modified: by zertrin