Batch file to delete files

ronatola Posts 4 Registration date Sunday February 15, 2015 Status Member Last seen October 28, 2016 - Feb 15, 2015 at 04:42 PM
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...