Batch file to delete files

[Closed]
Report
Posts
4
Registration date
Sunday February 15, 2015
Status
Member
Last seen
October 28, 2016
-
I can get this to work from a command line but when I run it as a windows batch file from the root dir it does not work.

forfiles /p "X:\TestDelete" /s /d -30 /c "cmd /c del @file : date >= 30 days >NUL"

Any ideas?

BTW - I got the cmd from this thread...
https://ccm.net/forum/affich-73016-batch-script-to-delete-file-older-than-30-day?full