eplisp

Timestamped Backup Copy

eplisp, the free multilingual LISP library

Timestamped Backup Copy
Openly licensed; the original file is hosted here together with its license.
…
Rate this tool:
CommandsBAK
CategoryOther Tools
AuthorJacob Dein
Sourcejacobdein/AutoLISP
LicenseMIT
RequirementsAutoCAD for Windows, BricsCAD for Windows; uses Visual LISP file functions.
Prompt languageEnglish
Filesbak.lsp (2 KB)
Added2026-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

  1. Load bak.lsp with APPLOAD.
  2. Save the drawing (QSAVE).
  3. Type BAK at the command line.
  4. 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.

References

  1. Source repository: jacobdein/AutoLISP – https://github.com/jacobdein/AutoLISP
  2. Author: Jacob Dein – https://github.com/jacobdein
  3. 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