CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 9043

CAD tip CAD tip # 12592:

   
Question CAD 
 %  platform  category 
Q - question

How to automatically purge old backup files .BAK?

A - answer How can I save disk space? I would like to regularly erase (delete) backups of AutoCAD DWG drawing files, i.e. old .BAK files.

You can use a handy batch command "forfiles" (available in Windows since the version Vista). With proper parameters (see its help: forfiles /?), you can then run this command in Windows login scripts or regularly, using the Job scheduler.

Examples:

Delete .BAK files older than a half year from the current folder:

forfiles /M *.bak /D -183 /C "cmd /c del @file"

Delete .BAK files older than a month from the Drawings folder and all its subfolders on disk D:

forfiles /P "D:\Drawings" /S /M *.bak /D -30 /C "cmd /c del @file"

Purge all drawing backups from the disk C:, created with the automatic tool SureSave, which are older than a quarter-year:

forfiles /P "C:\" /S /M "SURESAVE_*.dwg" /D -92 /C "cmd /c del @file"

ACADLTADTPlantACADMCivilMap
100% Win10,Win8,Win7,Vista  CAD 
2.5.2020    25737×   FAQ  

See also:
Tip 8778:How not lose edited DWG drawing even when closed without saving.
Tip 7901:How to redirect AutoCAD BAK files to another folder?
Tip 4345:What is the difference between .BAK, .SV$ and .AC$ backup files?
Tip 3643:How to convert a .BAK file to a .DWG?


Back   All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Increase your productivity with our set of BIM add-on functions for Autodesk Revit
CADstudio Revit Tools More info


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist