Zettelkasten Forum


Should I append the datetime UID to the end of the file name instead?

Hi, I am new to Zettelkasten method and trying to evaluate the format of the notes for myself. It will be for note-taking digitally.

Most software adds datetime to the beginning of the file name. It looks tidy. But a series of numbers means a little to human. If I browse through the file names in a small window of a file manager, I can only see the digits without meaningful titles.

The advantages of placing datetime to the beginning of file names is tidy and sortable. I think.

Any thought from you is appreciated. Do you think it is a good idea to append the datetime after, what is the pros and cons?

Comments

  • Welcome to the forums @linux.

    It depends on what software you are planning to use.
    Many programs support custom note names right out of the box. Some require a bit of tweaking.

    I name all my notes in the Title UUID format for the reason you point out. I made the switch when I had less than 1K of notes. I thought I'd discover some workflow snafu that would send me back, but after a year and 1500 more notes, I have forgotten what it was like to stare at a collum of UUIDs, not seeing the note titles because my laptop didn't have enough screen real-estate. I will not go back. With some regularity, I visually refer to the UUIDs, so I'm keeping them in the note file name.

    I use The Archive and have created a few Keyboard Maestro macros to fix where The Archive expects the UUID in front of the filename. But it turned out to be trivial.

    Given your user_name, I suspect you won't be using The Archive and have a bit of geekiness behind you, so unforeseen hazards can be rectified or sidesteped. GIve it a try. You can always change your mind and use a cmd-line tool to mass rename the files or a SQL-query in the case of a DB to change things.

    Will Simpson
    My zettelkasten is for my ideas, not the ideas of others. I will try to remember this. I must keep doing my best even though I'm a failure. My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    kestrelcreek.com

  • If you're using The Archive (which is great, by the way), it is probably simpler to go with the flow, and use a datestamp at the beginning of a filename. That way, you can place a link around only the datestamp and clicking on it will go directly to the page. (This gives you freedom to change the rest of the filename later if you want.) If the datetime is at the end of the filename, a link to the datetime will bring up a list of search results, probably containing two files – the target file, and the file containing the link to it.

    It does add a clutter of numbers, but a datestamp is often intrinsically useful at the start of a filename.

    You can use the built in datestamp, which looks like this: 20220319113 (that is, year, month, day, hours, minutes). Personally, I prefer to make my own, which matches the datestamps I already use. It has this format: 2022-03-19 113333. Either one works fine.

    What I would normally do is have a top-level document, and enter a datestamp and title.

    2022-03-19 113333 More thoughts on project

    When I've finished typing, I cut the text, put double brackets around the whole title, then click on it and hit enter to create a new file named "2022-03-19 113333 More thoughts on project.txt". I then paste the text inside the new document.

    I then go back to the top level document and change the double-bracketed link so, instead of surrounding the whole title, it just surrounds the datestamp. Now I can can freely change the document filename if I want to and it won't break any links.

  • @Will good to know you are doing well. I am modifying some open source project on Windows for my own sake. But as @DuncanMKZ said, compatibility is the another point. I found a great app Zettel Notes on Android, probably the best, but it follows the datetime convetion. I don't know how to write Android apps. Using someone else's work is always a temptation.

  • @linux how is it working for you so far?

    @DuncanMKZ do you know if this is a common approach for the apps to resolve links by part of the filename?
    I use iA Writer and they require to put the whole filename in the wiki link. I also tried Obsidian before and they don't resolve link by part of the filename either.

    @Will In your screenshot I see a hidden section with UUID, cdate, tags.
    Why do you have UUID and cdate in there while UUID in the filename represents the same info already?
    Also, why do you hide tags from the view?

  • @nick_kadutskyi said:
    @Will In your screenshot I see a hidden section with UUID, cdate, tags.
    Why do you have UUID and cdate in there while UUID in the filename represents the same info already?
    Also, why do you hide tags from the view?

    Nick, the YAML frontmatter is not hidden, it is in plain view. The YAML section contains information about the physicalities of the note that are not needed when the note is converted to a presentation document. The cdate is formatted in a way that is easier for this old man to decipher than the 12 digits used in the filename. Tags are used by the application but a confusing when presenting work for publication.

    I probably am confused, but I make a distinction between a UID and UUID. In The Archive they behave differently. The UID finds all references to that number and presents them in a list and it waits until you select a note before presenting it in the editor window. Using the UUID presents only one note, the target note, and it is presented in the editor window without any additional selection. The UID appears on many notes as links, but the UUID appears on only one.

    Will Simpson
    My zettelkasten is for my ideas, not the ideas of others. I will try to remember this. I must keep doing my best even though I'm a failure. My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    kestrelcreek.com

  • @Will said:
    Tags are used by the application but a confusing when presenting work for publication.

    That's a good point. I haven't thought about publication.

    I probably am confused, but I make a distinction between a UID and UUID. In The Archive they behave differently. The UID finds all references to that number and presents them in a list and it waits until you select a note before presenting it in the editor window. Using the UUID presents only one note, the target note, and it is presented in the editor window without any additional selection. The UID appears on many notes as links, but the UUID appears on only one.

    Understood

    I am at the point where I am trying to optimize my note template:

    filename: [UUID] [title]
    template:

    ---
    title: [title]
    ---

    #tags_here

    [body]

    ---
    **References:**

    I plan to change it to something like this:

    filename: [title] [UUID]
    template:

    ---
    tags: #tags_here
    ---
    # [title]

    [body]

    ---
    **References:**

    I am figuring out several things:
    1. If I really need a UUID at all since I keep all of the notes in a single folder so that I can't really create two notes with the same name. And to refer to a note in a wikilink I can still use a filename.
    2. If I still need a UUID I am thinking to put it in the end of the filename to see a filename in a narrow window.
    3. I like the idea of keeping cdate in a file or a filename instead of relying on metadata of the file which can be overwritten. UUID based on date seem like a good idea but there is no reason to keep it in the filename. And keeping it in the beginning of the filename just for the sake of sorting by creating date doesn't provide any value for me.

  • @nick_kadutskyi said:
    I am at the point where I am trying to optimize my note template:
    I plan to change it to something like this:

    filename: [title] [UUID]
    template:

    ---
    tags: #tags_here
    ---
    # [title]

    [body]

    ---
    **References:**

    I'd be careful about using --- other than the pair bracketing the frontmatter. These are special codes used by presentation software like pandoc and Markdown reviewers. Use above the 'References:' ––– instead. Three em dashes instead of three dashes.

    I am figuring out several things:
    1. If I really need a UUID at all since I keep all of the notes in a single folder so that I can't really create two notes with the same name. And to refer to a note in a wikilink I can still use a filename.

    I wonder if you end up with a file named
    A wonderful note 202207211328.md
    A wonderful note 202207211328.1.md
    A wonderful note 202207211328.2.md

    My system will occasionally do this, and it is annoying. Some file systems will automatically rename duplicates in weird ways. I don't think you can depend on "since I keep all of the notes in a single folder so that I can't really create two notes with the same name." They won't be exactly the same but close enough to fool the eye or break various parts of the application. By the way, what zettelkasting software package are you using?

    1. If I still need a UUID I am thinking to put it in the end of the filename to see a filename in a narrow window.

    Shouldn't be a problem. If it becomes a problem, you can always go back and put the UID in the front of the filename.

    1. I like the idea of keeping cdate in a file or a filename instead of relying on metadata of the file which can be overwritten. UUID based on date seem like a good idea but there is no reason to keep it in the filename. And keeping it in the beginning of the filename just for the sake of sorting by creating date doesn't provide any value for me.

    Dropbox syncing across multiple machines messes with the file metadata. For me, the UID goes in the filename and UUID goes in the file frontmatter. Again my weird distinction between UID and UUID.

    Will Simpson
    My zettelkasten is for my ideas, not the ideas of others. I will try to remember this. I must keep doing my best even though I'm a failure. My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    kestrelcreek.com

  • I'd be careful about using --- other than the pair bracketing the frontmatter.

    As I know in markdown three dashes should be transpiled into <hr> HTML tag.
    Since HTML it totally valid in markdown I can use <hr> but I am not familiar with the differences in how markdown entities are transpiled in different apps.
    iA Writer articles tell me that they aren't inventing anything new that will work properly only in iA Writer.

    By the way, what zettelkasting software package are you using?

    About six months ago I switched from Obsidian to iA Writer which supports wikilinks (the only feature I really need). Obsidian felt overcomplicated and bloated. iA Writer is very simple, minimalistic and cross-platform.

    I wonder if you end up with a file named
    A wonderful note 202207211328.md
    A wonderful note 202207211328.1.md
    A wonderful note 202207211328.2.md

    My system will occasionally do this, and it is annoying. Some file systems will automatically rename duplicates in weird ways.

    I had this problem but mostly when I moved files around. Now I create all the notes in a single folder and MacOs will tell me if I am creating a file with existing name in that folder.

    Dropbox syncing across multiple machines messes with the file metadata. For me, the UID goes in the filename and UUID goes in the file frontmatter. Again my weird distinction between UID and UUID.

    Haven't used Dropbox but Tresorit seems fine. At this point I have the same creation date on all the devices where I sync my notes.

  • @nick_kadutskyi said:
    As I know in Markdown three dashes should be transpiled into <hr> HTML tag.
    Since HTML it totally valid in Markdown I can use <hr> but I am not familiar with the differences in how markdown entities are transpiled in different apps.

    iA Writer handles three --- dashes just fine. I just now tried three sets of --- in Marked2, and it wasn't confused. For the life of me, I can't remember where I got this idea in my head.

    By the way, what zettelkasting software package are you using?

    About six months ago I switched from Obsidian to iA Writer which supports wikilinks (the only feature I really need). Obsidian felt overcomplicated and bloated. iA Writer is very simple, minimalistic and cross-platform.

    iA Writer is a great package to use for a ZK. One weakness is in how it handles wikilinks. In iA Writer, as in a lot of note software, the wiki link has to be the entire filename minus the extension and can not be only the UID. I wonder if I'm a bit stuck and locked into The Archive because my links are shortened to only the UID.

    If I select one of the wiki links in the note pictured below, iA Writer thinks I want to create a note with the title "202006051946". Below is a picture of a note from my ZK, imported into iA Writer. The raw Markdown is on the left, and the presentation is on the right. You can see how the YAML front matter is not visible in the presentation. In some Markdown presentation apps, the YAML front matter can contain variables that can interact with the presentation. Thinks can be included like print paper size, font types, and picture formatting.

    Will Simpson
    My zettelkasten is for my ideas, not the ideas of others. I will try to remember this. I must keep doing my best even though I'm a failure. My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    kestrelcreek.com

  • I wonder if I'm a bit stuck and locked into The Archive because my links are shortened to only the UID.

    I don't know if it's common within similar apps to allow partial filenames but iA Writer and Obsidian are working with the whole filename.
    I guess it might be convenient to have only zettel id because it takes less space, but it feels a bit like lock-in. At least to the extent of your ability to write a script that will look for file names based on the zettel id and will do replacements in all the files.

    If I select one of the wiki links in the note pictured below, iA Writer thinks I want to create a note with the title "202006051946".

    I use this feature constantly.

    For instance, I am writing a note and decide that I want to split further ideas into a separate note.
    I will type [[]] and provide a name of the note and then use a text expander app (aText) to generate zettel id. Then I click on that and continue typing my further ideas in a separate note.
    iA writer supports many shortcuts to go back and forth between notes.

    In some Markdown presentation apps, the YAML front matter can contain variables that can interact with the presentation.

    iA Writer considers frontmatter as metadata and you can use those variables like described here iA Writer Metadata

    On the topic of this thread.

    I actually switched to the new filename format where zettel id is in the end of filename.
    Already it's easier to look through filename.

  • @Will said:
    Welcome to the forums @linux.

    It depends on what software you are planning to use.
    Many programs support custom note names right out of the box. Some require a bit of tweaking.

    I name all my notes in the Title UUID format for the reason you point out. I made the switch when I had less than 1K of notes. I thought I'd discover some workflow snafu that would send me back, but after a year and 1500 more notes, I have forgotten what it was like to stare at a collum of UUIDs, not seeing the note titles because my laptop didn't have enough screen real-estate. I will not go back. With some regularity, I visually refer to the UUIDs, so I'm keeping them in the note file name.

    I use The Archive and have created a few Keyboard Maestro macros to fix where The Archive expects the UUID in front of the filename. But it turned out to be trivial.

    Given your user_name, I suspect you won't be using The Archive and have a bit of geekiness behind you, so unforeseen hazards can be rectified or sidesteped. GIve it a try. You can always change your mind and use a cmd-line tool to mass rename the files or a SQL-query in the case of a DB to change things.

    All my files are currently named 'UUID Title'
    I've also been thinking about this a lot lately and would like to rename them w/ the Title first- is there a simple way to mass rename my files to 'Title UUID' on macOS? The standard Finder 'Rename' quick action doesn't seem to give me the appropriate renaming options to achieve this.

  • Hi @orice,
    There is more to making this change than changing the note file names. This is a tiny bit geeky. The format of your links has to be considered. Otherwise, the links will not be able to find the right note. Once you change the filenames, test all your link types.

    I'd recommend starting by making a full backup. Without this step, you are inviting disaster.

    I used a great tool called MassReplaceIt to change the file names. Here is a series of screenshots showing the setup. The nice thing about this is that it is trivial to reverse these changes. Of course, you also have the full backup you made earlier.

    Will Simpson
    My zettelkasten is for my ideas, not the ideas of others. I will try to remember this. I must keep doing my best even though I'm a failure. My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    kestrelcreek.com

  • @Will said:

    ...
    I used a great tool called MassReplaceIt to change the file names.

    Thank you for that suggestion. I will not need to launch Vscode to run Find and replace in several files.

  • hi, first post here but thought I might piggy back on this thread to begin with.

    I'm tossing up the whole uid in filename vs note body thing myself. I have been naming my files with regular english but including a uid (14 character default of YYYYMMDDHHMMSS) in YAML frontmatter and linking with that uid only, using Zettlr. Now reconsidering my options re future and with a view to remaining software agnostic. Does anyone know of a script that can take the uid from YAML frontmatter and append (or prepend) to the filename?

  • @ronaldroy I don't know of a script that operates as you want, and I need to be more familiar with Zettlr to understand what would happen if the filenames were changed. I've written similar scripts in the past and would love to try to write one for you. What I'd need is a sample file or three. We'll have to see if you have too many exceptions for this to be practical.

    Will Simpson
    My zettelkasten is for my ideas, not the ideas of others. I will try to remember this. I must keep doing my best even though I'm a failure. My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    kestrelcreek.com

  • edited January 2023

    @Will Wow, really?! I can give you something if required but Zettlr just works on .md files. Internal links are created with double brackets.

    From the docs:

    Zettlr will automatically try to find an ID for a file by searching through its contents. If it has found an ID that is not encapsulated by a Wiki link (more on that below), it will assume this ID internally to refer to the file. If there is more than one valid ID in the file, the first ID will take precedence.

    Actually, it searches the filename first. For example, if the filename uid differs from an uid in the body (YAML or elsewhere), it will use the uid in the filename.

    I'll link to the info here instead of copy paste: https://docs.zettlr.com/en/academic/zkn-method/

    All my linking and searching is working well with plain english filenames and uid in YAML frontmatter. I'm just thinking ahead and trying to plan for possible problems. Zettlr includes a nice option to display the file in its own browser using the title from YAML only. This means, I can include a long uid in the filename but not have to look at it!

    Post edited by ronaldroy on
  • @ronaldroy said:
    Internal links are created with double brackets.

    Yes, how do these look? [[UID]] or [[Title of note]] or [[FIlename without file extension]]? Does Zettlr update links when the filename changes?

    I should download and try it myself.

    All my linking and searching is working well with plain english filenames and uid in YAML frontmatter. I'm just thinking ahead and trying to plan for possible problems. Zettlr includes a nice option to display the file in its own browser using the title from YAML only. This means, I can include a long uid in the filename but not have to look at it!

    It sounds like everything is working for you. I'd recommend not fussing with ain't broke. You are recording a UID in each note in the YAML frontmatter, so you have it as futureproofing insurance. But who knows what the future will bring, maybe a ZK that doesn't use or need UIDs. If you heart is set on changing the filenames, I'm game to work on writing a script for that. Do you have python 3.8+ installed, or should we stick to zsh?

    By the way, how many notes are we talking about?

    Will Simpson
    My zettelkasten is for my ideas, not the ideas of others. I will try to remember this. I must keep doing my best even though I'm a failure. My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    kestrelcreek.com

  • @Will said:

    @ronaldroy said:
    Internal links are created with double brackets.

    Yes, how do these look? [[UID]] or [[Title of note]] or [[FIlename without file extension]]? Does Zettlr update links when the filename changes?

    I think they can be any of those but I use [[UID]]. Then I am free to change filename and/or title and links remain.

    It sounds like everything is working for you. I'd recommend not fussing with ain't broke. You are recording a UID in each note in the YAML frontmatter, so you have it as futureproofing insurance. But who knows what the future will bring, maybe a ZK that doesn't use or need UIDs.

    By the way, how many notes are we talking about?

    Yes it's working well, just thinking about future proofing before I get too far down the rabbit hole. I tinkered briefly with pointing Obsidian (for example) at the same folder and it almost worked - pretty sure it needs uid in the filename though. Only around 500 notes.

    If you heart is set on changing the filenames, I'm game to work on writing a script for that. Do you have python 3.8+ installed, or should we stick to zsh?

    Neither / either? :) I am no coder, even the terminal is a mystery to me! On a mac by the way.

Sign In or Register to comment.