Paste Rename
pendingby rookie
Intercept paste/drop files, archive with dynamic path and UUID/HASH naming, and insert links using your preferred link style.
Paste Rename
Paste Rename is an Obsidian plugin for a "paste/drop and archive immediately" workflow. It intercepts file input in Markdown editor, stores files using one dynamic pattern, and inserts links that follow your Obsidian link style.
Features
- Intercepts
PasteandDropin Markdown editor. - Uses one unified
assetPatternfor folder + filename generation. - Supports variables:
{{YYYY}} {{YY}} {{MM}} {{DD}} {{HH}} {{mm}} {{ss}} {{FILENAME}} {{UUID}} {{HASH:n}}. - Automatically deduplicates names by regenerating unique segments.
- Inserts links following Obsidian
Use [[Wikilinks]]preference. - Optional lossless PNG compression (disabled by default; PNG only).
Pattern Examples
Example 1 (Recommended)
assetPattern:
09-Assets/{{YYYY}}-{{MM}}/{{YYYY}}{{MM}}{{DD}}-{{FILENAME}}-{{HASH:16}}
Assume:
- Current time:
2026-02-07 15:32:10 - Active note:
Test Note.md - Pasted file type:
png
Output path:
09-Assets/2026-02/20260207-Test Note-c7c8d9e0f1a2b3c4.png
Inserted link:
- With
Use [[Wikilinks]]enabled:![[09-Assets/2026-02/20260207-Test Note-c7c8d9e0f1a2b3c4.png]] - With
Use [[Wikilinks]]disabled:
Example 2 (Short)
assetPattern:
assets/{{YYYY}}/{{MM}}/{{FILENAME}}-{{UUID}}
Possible output:
assets/2026/02/Test Note-123e4567-e89b-12d3-a456-426614174000.png
Variables
{{YYYY}} {{YY}} {{MM}} {{DD}} {{HH}} {{mm}} {{ss}}: local timestamp{{FILENAME}}: active note filename without.md, sanitized{{UUID}}: random UUID v4{{HASH:n}}: random lowercase hex,nin1..64
Manual Installation
- Build the plugin:
npm cinpm run build
- Copy files to your vault plugin directory:
manifest.jsonmain.jsstyles.css
- Ensure the folder name matches plugin id:
.obsidian/plugins/paste-rename/
- Enable Paste Rename in Community plugins.
Development
npm run dev: watch buildnpm run build: production buildnpm run lint: run official Obsidian ESLint checks (eslint-plugin-obsidianmd)npm run lint:fix: auto-fix lint findings when possiblenpm test: run unit tests
Releasing with GitHub Actions
Workflow file: .github/workflows/release.yml
- Bump version:
npm version patch- or
npm version minor - or
npm version major
- Push commit and tag:
git push origin main --tags
- GitHub Actions will upload release assets:
manifest.jsonmain.jsstyles.csspaste-rename-<version>.zip
Submit to Obsidian Community Plugins
After first GitHub release:
- Open a PR to
obsidianmd/obsidian-releases. - Add plugin entry in
community-plugins.json:id:paste-renamename:Paste Renameauthor:rookierepo:rookie-ricardo/obsidian-paste-rename
- Wait for review and merge.
Community Review Notes (Real Issues We Hit)
PR / Entry validation issues (obsidian-releases PR)
- PR body must follow the official template exactly (with checklist). Otherwise validation fails.
- New plugin entry must be appended at the end of
community-plugins.json. - Plugin description in PR context must match
manifest.jsonand latest GitHub release metadata. - Do not include the word
Obsidianin the short plugin description text. - Release tag / release title must match the exact version number in
manifest.json(novprefix).
Automated code scan issues (ObsidianReviewBot)
- Use sentence case for settings UI text.
- Do not include plugin name in settings headings.
- Use
new Setting(containerEl).setName(...).setHeading()instead of creating heading HTML directly. - Remove unnecessary type assertions that do not change expression type.
- Avoid control characters in regular expressions (for example
\\x00,\\x1fin lint-sensitive contexts). - Remove unused variables (including unused
catchparams).
Re-submission checklist
- Release a new patch version and publish assets (
main.js,manifest.json,styles.css). - Update
community-plugins.jsonentry if description/version-related text changed. - Push a new commit to your fork PR branch to retrigger
plugin-validation.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.