No description
Find a file
Gareth Evans 06e1f02256
Add rename option for file collisions during archive (#3)
* Add rename option for file collisions during archive

- Extend SimpleArchiverPromptModal to support optional third button
- Add generateUniqueArchivePath helper for timestamp-based naming
- Update archiveFile to show Replace/Rename/Cancel for collisions
- Generate unique filenames using YYYYMMDD-HHMMSS format
- Handle edge cases: files without extensions, multiple renames per second
- Preserve both existing and new files when rename is chosen
- Maintain backward compatibility with two-button modal usage

Fixes #18

* Use originalName in error message for consistency

- Move originalName declaration outside try-catch for proper scope
- Ensure both success and error messages reference original filename
- Prevents confusion if file.name is mutated during error handling
2025-10-16 00:13:59 -07:00
.github/workflows Add release workflow 2025-03-09 15:21:10 -04:00
.editorconfig Initial commit 2024-06-14 07:11:12 -04:00
.eslintignore Initial commit 2024-06-14 07:11:12 -04:00
.eslintrc Initial commit 2024-06-14 07:11:12 -04:00
.gitignore Feature: Implement unarchive functionality for files (#13) 2025-06-29 06:27:41 -04:00
.npmrc Initial commit 2024-06-14 07:11:12 -04:00
esbuild.config.mjs Add basic archiving functionality (#1) 2025-03-09 12:02:15 -04:00
LICENSE Add basic archiving functionality (#1) 2025-03-09 12:02:15 -04:00
main.ts Add rename option for file collisions during archive (#3) 2025-10-16 00:13:59 -07:00
manifest.json Bump version to v0.5.1 2025-07-01 10:00:38 -04:00
package-lock.json Bump version to v0.5.1 2025-07-01 10:00:38 -04:00
package.json Bump version to v0.5.1 2025-07-01 10:00:38 -04:00
README.md Bump version to v0.5.1 2025-07-01 10:00:38 -04:00
styles.css Initial commit 2024-06-14 07:11:12 -04:00
tsconfig.json Initial commit 2024-06-14 07:11:12 -04:00
version-bump.mjs Initial commit 2024-06-14 07:11:12 -04:00
versions.json Update version details 2025-03-09 15:13:22 -04:00

Simple Archiver for Obsidian

Move old, stinky notes and folders to an archive, where they belong!

Simple Archiver moves files or an entire folder to an archive folder that you configure. The items are moved to the same relative path in the archive folder. Conversely, items that have been archived can be moved out of the archive to their original location.

Archiving can be done via:

  • Simple Archive: Move to archive command
  • Move to archive file menu item
  • Move all to archive multi-file menu item

Unarchiving can be done via:

  • Move out of archive file menu item
  • Move all out of archive multi-file menu item

Planned Improvements

  • Archiving a folder that already exists in the archive merges the contents
  • Archiving a file that already exists in the archive gives the option to rename

Release Notes

v0.5.1

  • New: Add Move out of archive functionality to files/folders that exist in the archive. Items will be moved out of the archive into their original location (issue #5). Thank you to nicholaslck!

v0.4.0

  • New: Add "replace" option when attempting to archive a file or folder when an item with the same name and path already exists in the archive.

v0.3.1

  • Fix: Unable to archive files/folders in the vault root

v0.3.1

  • New: Validate archive folder name setting before saving

v0.2.0

  • New: Allow multiple files to be archived

v0.1.0

  • New: Basic archive functionality

Contributors