Timestamped Backup Copy
eplisp, the free multilingual LISP library
| Openly licensed; the original file is hosted here together with its license. | |
… Rate this tool: | |
| Commands | BAK |
|---|---|
| Category | Other Tools |
| Author | Jacob Dein |
| Source | jacobdein/AutoLISP |
| License | MIT |
| Requirements | AutoCAD for Windows, BricsCAD for Windows; uses Visual LISP file functions. |
| Prompt language | English |
| Files | bak.lsp (2 KB) |
| Added | 2026-10-26 |
| Download the original fileSource repository | |
BAK writes a date- and time-stamped copy of the saved DWG file into a bak subfolder next to the drawing, giving you quick manual version backups.
BAK, from Jacob Dein's AutoLISP repository, is a small command for taking manual interim backups while you work. It suits anyone who wants to keep the currently saved state of a drawing as a separate file before a risky change.
Overview
If the drawing's folder has no subfolder named 'bak', the command creates it. It then copies the DWG file on disk into that folder as '[YYYYMMDD-hhmmss]-drawingname.bak' and prints the full path at the command line. Existing files are never deleted or overwritten; every run adds a new copy.
How to use it
- Load bak.lsp with APPLOAD.
- Save the drawing (QSAVE).
- Type BAK at the command line.
- The backup is written to the bak folder next to the drawing; check the path shown at the command line.
Notes and limitations
- It creates a folder and writes a file on disk. It copies the last saved state on disk; unsaved changes are not included.
- In a never-saved drawing (Drawing1.dwg) there is no file to copy, so no backup is made, but the command may still print its 'Created' message; check the folder.
- The copy has a .bak extension; rename it to .dwg to open it.
- Paths are built with backslashes, so it does not work on Mac.
- The file also defines global helper functions named makedir and datetime; another LISP using the same names could overwrite them or be overwritten.
Source and license
This tool is not made by eplisp. The file is published unchanged under its author's license; copyright stays with the author.
- bak.lsp (2 KB)
- License text
References
- Source repository: jacobdein/AutoLISP – https://github.com/jacobdein/AutoLISP
- Author: Jacob Dein – https://github.com/jacobdein
- License: MIT – https://github.com/jacobdein/AutoLISP/blob/fd33423435da329d393b8d8552d3e69d03f94930/LICENSE
Found a mistake, or are you the author of this tool? Request a correction or removal