PDA

View Full Version : Delete files older than XX days



jpcadconsulting347236
2018-04-17, 06:15 PM
Hi gang,

I have acad.lsp calling a BAT file with the following code in it:


forfiles -p "C:\_AutoCAD Autosaves" -s -m *.* /D -180 /C "cmd /c del @path"

It deletes any file older than 180 days in the folder "C:\_AutoCAD Autosaves" when AutoCAD is launched.

Is there any way to achieve this within acad.lsp (so I don't have to call the bat file)?

Thanks for any guidance!

-JP

jpcadconsulting347236
2018-04-17, 06:43 PM
Ah... found it in another thread. Many thanks to userr jsowinski!!!

http://forums.augi.com/archive/index.php/t-106601.html