# ISO8601 and Files
so did you ever have filenames like `project_v5_final.psd`? Thats a surprisingly common „solution“, leading to all kinds of issues.
The alternative: timestamps. Ideally machine readable and standardised. Thats where ISO8601 comes into play.
- Heres an example of a date: 13. January 2024.
- Heres the same date in ISO8601: 2024-01-13 (the format is YYYY-MM-DD)
- Now lets add a time, 14:07:01 (2:07PM): 2024-01-13 140701 (YYYY-MM-DD HHmmss)
- you may seperate the date and time with a space or T
- I highly recommend adding seconds
If you rename your files with a ISO8601 timestamp, they will automatically be sorted by date, like this:
![[ISO8601 and Files-1740130077644.webp]]
Another bonus: if you move these files around or share them with someone via a cloud service like nextcloud or dropbox, they may lose the correct creation/modified metadata. Your filename will stay! This is a great version control system when collaborating with on binary files.
## Rename Tools
Now typing that every time is annoying? Luckily, there are many programs that can automatically add a time stamp for you based on the file modified (or created) date:
- Linux: [Szyszka](https://github.com/qarmin/szyszka) (FOSS) (my choice on linux)
- rename with `S(NAME) $(MODIF)`
- Linux: [KRename](https://apps.kde.org/en-gb/krename/) (FOSS)
- macOS: [Rename X](https://apps.apple.com/de/app/rename-x/id1438841416?l=en-GB&mt=12) (3,99€) (my choice on mac)
- check date and time, set them to modified and after. in the settings, adjust the format
- save your settings as preset or [download](https://cloud.lwgl.xyz/s/FABYrCoBN9AQ7Q8) my preset
- macOS: [Name Changer](https://apps.apple.com/de/app/name-changer/id6737516026?l=en-GB&mt=12) (5,99€)
- macOS: [Renamer 7](https://apps.apple.com/de/app/renamer-7/id6479783697?l=en-GB&mt=12) (27,99€)
- Windows: [Ant Renamer](https://www.antp.be/software/renamer) (FOSS)
- in actions „Use date & time“
- Windows: ~~[PowerRename](https://learn.microsoft.com/en-us/windows/powertoys/powerrename)~~ (free) (not good until [#6151](https://github.com/microsoft/PowerToys/issues/6151) is resolved)
- part of the [PowerToys Suite](https://github.com/microsoft/PowerToys#microsoft-powertoys), which I highly recommend if you want to hate windows less
## Scripting
If you need to copy and version a file, why not script these actions instead of doing them again and again yourself?
→ [[Scripting and automation]], [[ZSH]]