On file creation, is there a way to make sure file names are unique?

I keep stumbling upon duplicate files, or rather, files that are about the same source (article, book, etc.) with similar or identical names, and then I have to double check to see which one is more current or if they contain the same information.

Is there a way to prevent the system or myself from creating files with names that already exist? I know that this is already a thing if the files are in the same folder, but I have so many files that I would find this unmanageable to have them all in one folder.

This has been sort of already talked about, e.g. here: Ensure unique filename in a vault - #9 by Anandbhaskaran

with some dataviewjs solutions which are cool, but Iā€™d prefer some programmatic way of being told that thereā€™s already a file with that name, as if I have to check the dataview script, Iā€™ll likely forget to do so.

Iā€™m on Linux Mint, and Iā€™d also be OK if someone had an idea to do this from the Linux side of things for a directory not to include duplicate file names.

Any ideas?

Thanks!

I just list few solutions that donā€™t require coding.

1. Quick switcher

This is the most efficient way to create notes with unique names. How about you, have you used it?

2. Unique note creator

This plugin has its own template that you can use for single or multiple workflows.

3. QuickAdd

Using QuickAdd is similar to Unique note creator although you can manually configure multiple templates combined with unique naming scheme like My teaching session 20240819 and My gardening 20240819. Then you will create notes using some custom keyboard shortcut like āŒ˜ā‡§S or āŒ˜ā‡§D to launch QuickAdd: Run QuickAdd. Personally I recommend āŒ˜S or āŒ˜D for QuickAdd but they will override Save current file or Delete paragraph. Obsidian saves files automatically every few seconds and you can delete paragraphs using āŒ˜X.

iā€™d recommend some systematic approach to make sure the same source is processed once
@Feralflora has a great guide on a Zotero-Kanban workflow:

  • you would need a script written, which i reckon nobody will write hereā€¦so the quickswitcherā€™s fuzzy search functionality can be one safegard and some dataview or obsidian metadatacache check but either way, youā€™d need to run the script yourself ā€“ although the note creation template itself could be merged with the metadatacache check first, so that seems doableā€¦but lately i donā€™t see many people jumping here with scriptsā€¦ everyoneā€™s hooked up with bots now and want instant results and solutionsā€¦

i seem to remember you have some kindle or other non-zotero workflow but i cannot recommend anything else apart from what i remember and what iā€™ve triedā€¦

1 Like

How are you creating the notes? The quick switcher and the link auto-suggestions should both show identical names when you type. Similar names are also likely to appear, tho that depends on how similar and whether any other names might fuzzily match.

Usually, I create notes by hitting right-click on a folder and then create new note.

If Iā€™m doing that in my normal workflow, it hasnā€™t been a problem. What becomes more difficult is when I import notes from another vault which may have had a similar project with an overlap in sources, then to realize thereā€™s multiple instances of the same source being discussed. Iā€™ll work through the link provided by @Yurcee (thanks for that!) and try and figure out a better workflow when importing new stuff.

Thanks!

you neednā€™t do a complete overhaul of your workflow - esp. on my account

you can add some properties to your notes (you can add links as well) and use local graphs for instance, where you group the players (linked notes) with some colour, filter with some regex or simply paths to where the usual suspects would resideā€¦
you can even add custom bound graph presets with the Graph Presets plugin (takes some getting used to)

you need to work out and settle on some workflow that suits your needs

Ah, I see. Yeah, it would be great if Obsidian had an ā€œenforce unique names for new filesā€ setting. (Tho that wouldnā€™t help with your other case of similar names.)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.