Ask HN: How do you organise your files and folders?

181 points by throwawayt856 ↗ HN
By project, by tool? What do you do with pdfs and reference stuff, surely not Dewey Decimal?

181 comments

[ 3.3 ms ] story [ 319 ms ] thread
Does the total time searching for files exceed the time it would take to meticulously organize them?

https://www.voidtools.com/

Search is definitely faster, but I think both compliment each other. I use Everything(and Listary) about 90% of time too. But I think there has to be some kind of rough hierarchy in place, to make the scope of search smaller and find the files quicker.

Also, sometimes you cannot find that one file you're looking for with search, or worse, cannot even remember what it's called, but with some light organization, you at least have some idea where that file resides.

Exactly how the default application organizes them, whether they are documents, source code, built artifacts or whatever. I have more to do in life than agonize over that.

In fact, where you hang your ornaments (files) on the ceremonial file Christmas tree (file/directory/parent directory tree) is the least interesting part about files.

I'd far, far rather have a rich set of attributes and a way to create relations over them. "All the files I printed by date", "emails I received from so-and-so", "attachments by destination" and so on. Real relationships I actually care about.

This is one of my hot buttons, can you tell?

`ag -g 'some-piece-of-the-name-that-seems-kind-of-likely'` [0]

[0] https://github.com/ggreer/the_silver_searcher

fzf piped to xargs. Fzf is a fuzzy interactive string search, by default searches path names below current directory. Allows selecting multiple entries with --multi
I never realized how crucial fzf was to my workflow til a fish shell update broke it and I was paralyzed til I got it fixed
You should try ripgrep
Why? It has pretty much the same functionality as ag and comparable speed.
It's about 5x faster given their benchmarks. Also it's written in Rust ;)
Why should I with all the search available?
Last summer I worked at an art gallery. It was my first time working on a shared file server and it was a mess—except for the exhibition files.

There was a main “exhibitions” folder. Inside of that was a folder for every show in the gallery’s history.

Each of these was named starting with the year of the show + another number indicating whether it was the first show of the year, or the second, etc.

There was a somewhat standard structure for what you would find inside of each of these (contracts, artists bios, press photos, etc), but it didn’t really matter because there were few enough files that it was easy to browse.

After a couple of weeks, I went home and organized my projects and documents according to the same pattern. I find things faster now.

The keys are this: (1) broad top-level categories (“exhibitions”) (2) dated folders (3) shallow structure inside dated folders (files in root or one folder deep)

This pattern makes it easy to know where to put things, and Easy to browse. Find the category you want, then the date range you want. Now you’re only have a few folder names to read. Browsing the files inside of there might take a little while if there’s a lot, but usually there won’t be. And you can relax because if the file exists, it’s gotta be in here.

(Or maybe one other place—sometimes files don’t make it out of “Downloads,” and sometimes I have to check both “Art” and “Design” before I find the project I’m looking for. But that’s ok, because dated folders makes that easy to do.)

Others will suggest giving up and relying on search. Search is great, but it only works for files you know (or remember!) exist. Build a simpLe browsable structure and you can find things you’ve forgotten about, or tell collaborators where to look for things they want.

I like that in general, but I would suggest not to use dates in folders - the date is automatically in the file properties of the folder so you can sort by it.

By all means keep a number in the folder name, if the number is meaningful, but also keep a human understandable name in there. That helps when you can't remember if it was the fifth show or whatever, maybe you can remember the name when you see it.

Or maybe I am missing something?

Anyway I try to organize my files kinda like that, but use my Downloads folder as GTD inbox: nothing is meant to stay there.

Ah! The folder name is still human readable, just with a date out front: “2019 open education conference” for example.

Putting the year in the name is helpful because the year you did the thing may differ from from the created/last modified date. At the gallery, for example, these folders go back to the 1950s.

Even for more recent projects, I find myself adding to old folders from time to time (converting document formats etc), or not recognizing that a handful of files represent a coherent “project” until a year after I created the first one.

So it’s useful to be able to swap between sorting by file-system time and “actual” time. It prevents alphabetical sorting, but if I know enough of the name for alphabetical sorting to be useful I can usually just use a search.

Agreed re: Downloads, although it can take some time to get to it.

Edit: I also see others talking about having “archive” folders. The date system makes that mostly unnecessary.

~/Documents/$(YYYYMM)/ mostly for personal stuff. I have a Makefile rule in ~/Makefile that moves ~/Desktop/* there periodically.

I also have ~/Documents/eeqj/$(YYYYMM)/ for my revenue-related files, and ~/Documents/eeqj/$(YYYYMMDD).$(PROJECTNAME)/ for specific projects.

On Mac, I don’t really bother with too much file organization. I have some broad categories but really not more than 1 or 2 folders deep. Stuff that doesn’t fit into those categories just goes in the folder with everything else. Although, I put all presentations in the same folder. I mostly use spotlight for files navigation.

On Windows, I find I need to spend more time organizing as the search seems to be substantially worse than spotlight. Search is still my go to though.

i dump them in my homedir for a while, and then periodically delete old stuff.

i've never felt a need to organize my files as files. if it's important enough to organize, it's important enough to put in a wiki or git repo or some more structured way of organizing things than files on a filesystem.

PDFs and reference material not written by me is stored in mendeley/zotero (I'm using both right now) so it's easily cross referenced and text searchable across my devices and I'll have my reference material at any job I go to. My background is engineering not research but when I discovered these tools my note taking/referencing skyrocketed. I put every worthwhile pdf I find in it. I've begun following a lot more research/science types lately to learn their systems because it's stuff I never really encountered on this end of tech.

Code is in ~/workspace which is typically ~/workspace/$company/$github-repos

My markdown docs (snippets, research) are in ~/workspace/docs/$whatimresearching

I do everything out of my workspace. This lowers the amount of cruft I have to move between systems when migrating. Mostly dotfiles and ~/workspace and I'm good to go. And I keep offline backups of course.

At this point, I've decided 75%+ of stuff is transitory and doesn't deserve the time to be filed into a hierarchical local file system, so I just leave it all in Downloads on OS X. Github, Overleaf, Google Docs, and email has all the critical stuff. And of course I have full backups for years. This horrifies some people, but has worked well for me for about 5 years.
Similar strategy: I treat my desktop as a temporary workspace. Anything transient goes there, and a cron job clears out unused files automatically:

    find ~/Desktop/ -atime +3d  -maxdepth 1  \( -type d -o  -type f \) -exec trash "{}" \;
If I really need something that gets deleted, I can go to my backups.
I could really use not a full download-to dialog on every save in my browser, but just a prompt for a very small set of download locations I've defined, possibly filtered by extension (.jpg -> 'photos_to_sort' or 'memes' or 'temp_junk' as my options)
Try using Hazel (macOS-only) to auto-file stuff for you based on whatever naming conventions or file extensions you want. It’s amazing.
For anything organized by date using ISO 8601-inspired date formats (yyyy-mm-dd-hh-mm-ss) is supremely helpful.
I very dutifully curate my text files, but for everything else I always struggled to follow the GTD "Reference" alpha system.

Tiago Forte has a system called PARA:

- Projects

- Areas

- Resources

- Archive

This is just enough structure for me to know where things are. The hardest part to me is there are things that cross the Areas/Resources boundary.

By project. https://egypt.urnash.com/blog/2019/01/06/how-i-work-file-org... goes into more detail. I am an artist, so perhaps what works for me won't work for programmers - but I am also an artist who self-publishes comics, which are huge projects that sprawl across multiple files and programs.

References go into a few directories, there are some vaguely sorted directories of inspirational images, books go into an "ebooks" directory that has a few broad categories in it, mostly I just go to that directory and type what I'm looking for into OSX's search bar.

When I do commissions, reference images generally get dropped into the Illustrator file and deleted from the filesystem.

Basically dump everything in ~/Downloads and then a couple of scripts to archive it off to ~/doc/YYYY-MM every month, then every now and then I might sort that into ~/archive/home/doc and ~/archive/work/doc.

Got a few context-specific directories; ~/src, ~/screenshots, ~/notes.

Search using Finder, find or ripgrep.

I wrote a bit more about it at https://www.garethrees.co.uk/2019/11/24/filesystem-organisat...

1) I collect a bunch of Very Important Documents and Files. I maybe try to organize them.

2) At some point (days in...) this falls apart.

3) I get sick of not being able to find new files and throw everything in some folder ('archive', 'shit', whatever)

4) these end up on a hard drive in a drawer somewhere, eventually.

5) I go "man I need to throw away these old hard drives, better make sure there's nothing good on them"

6) I find the junk folders go "oh man good thing I didn't just toss this drive" and put the junk folders somewhere on whatever my current backup/mass-storage drive is ("uhhhh I don't have a good place for it, I'll just stick it here and go through it later to categorize everything, I'll just call this 'old_drive_stuff'" but of course I never look at it again).

7) At no point do I examine or use any files that land in any junk folder aside from maybe getting a brief "oh shit I remember that!" nostalgia trip on re-discovering them, before tucking them away again, not to be seen until I am once more clearing off an old hard drive so I can throw it away.

Incidentally, I think two things that might help with this are 1) not having to manually clean up filenames and metadata on every goddamn thing before I feel comfortable putting it in with my "nice" files (this is part of why files accumulate in a kind of "junk drawer", because I put off this work), and 2) some kind of easy "send-to" workflow to toss (especially downloaded) files to pre-defined categorized locations, ideally with both a very quick manual interface (not farther than two clicks away, or one CLI command) and an optional automatic one based on file extension. All configurable, naturally. Bonus for more complex filtering rules—like my mail inbox, really. Yeah I could write it but that's one more thing to carry around and another thing that would leave me helpless on machines that aren't mine, or aren't my main OS, or whatever. It should be built into the OS or file manager.

I also think there are lots of different kinds of files and handling them all the same isn't great. Ideally my editing-format documents would actually be a container holding an archive of "finished" versions of them (not just every time I've hit save, and certainly not a complete undo history or anything) so they all move around together and can't get separated. Same for photos, probably—keep an original and any edited variants I've made all in one file and only (and automatically) split them up (export one of them) when it makes sense to do so.

[EDIT] example of otherwise-good software that tries to do some of this organization for me on-file-open but fails at it: iBooks. There are two main categories of ebooks I open: those I want to keep around permanently, and those I just want to look at for a little while then I don't need it anymore, or that I want to keep around but strictly associated with some other files on disk. Opening a .epub adds it to my icloud-backed-up iBooks library every single time. This is perfect for books I want to keep but sucks for books I'm just opening for a second, because then I have to go delete them, or keep a second (probably worse) ebook reader around and understand both programs' features. I have two types of .epub, then, with different use cases and organizational patterns needed—I need an "add to library?" prompt when I open them. IIRC Calibre does something similar and can't be my only ebook reader for the same reason (which makes me want it not to be an ebook reader at all, just an organizer accessible through an open-with menu)

[EDIT 2] Oh it's just called "Books" I guess. Was it ever iBooks or did I imagine that? Whatever, point stands.

I use a system I created called: Shelf, Desktop, Cabinet.

I use the 'shelf' folder to store all the files I use and reuse (usually, transform) at work. E.g. templates, stock photos, contracts, pieces of code etc.

My actual projects are sub-folders inside the 'desktop' folder. Metaphorically speaking, they are 'sitting on the desktop'. Folders are named like this: 'client_name - project_name'. Whereas 'client' can be anything like: 'me - learning Vue.js'

The 'cabinet' folder files completed projects should be no longer on my 'desktop'. I just move them into there, where they can be easily sorted alphabetically. But before doing that, I take elements that could be reused someday in similar projects, copy them into the 'shelf' folder and give them a generic name that I can easily find through a search.

edit: clarity (I guess...)

Similar to mine too. Though my 'Desktop' is my Google Drive folder, always sync to cloud. My real desktop though, is temporary place for pile of files of current working project of that day. I clean up this real desktop at the end of the day, put the files into their rightful place or delete it, just some old habit.

I have some kind of 'shelf' too, but your idea about taking element from soon-to-archive project and put it in a shelf is what I overlook. I'll give it a try!

It can be hard to separate things in the beginning because if you ask yourself: "What is important from this work that should be in shelf?", your answer would tend to be "everything". So, instead, you should be asking yourself "which elements can I be reusing in future work?" regardless of their importance.
An amusing aside: When I was in grad school, the university created a little pamphlet to help students answer the question: Should I get my own computer?

That such a question could even be asked, dates me. But one comment in the pamphlet still seems to ring true:

Don't expect the computer to organize you. If you have a messy desk, you will have a messy computer.

For me, search is how I organize my files, and yes I suffer from my lack of organization.

> Don't expect the computer to organize you. If you have a messy desk, you will have a messy computer.

Nicely put. This has been the biggest invisible wall whenever people sing praises of some particular organizational tool. It’s easy to learn the tool if one has a clear notion of “legibility” to impose on data and processes, but that organizational clarity seems to be much harder to pick up. Nobody really talks about that, and I suspect it’s also a much harder thing to communicate as it gets close to the core of one’s perspective towards knowledge and activity.

I also wonder whether there’s some tradeoff in being legibly organized, and seeing liminal possibilities.

(comment deleted)
By context (Development, Personal, Business, References) on my personal machines and by project/customer on the work ones.

Right now, since I've moved about in the company a bit, and still have an archive of work from my previous role, that means "My Org/Customer Deliverables/ACME/Coyote Dynamite Project" and whatnot.

All my deliverables are named "YYMMDD Thing that got done.format" inside those folders (and yes, I still version some of these manually, because they are easier to compare side-by-side).

I do that because in Spotlight it is trivial to start typing the approximate date of what you did by memory and (in the past, before macOS became hopelessly bloated) I got to any important file in less than 2 seconds.

(Today, of course, Spotlight is useless and takes up to 30s to display anything of consequence.)

Reference stuff goes into folders by topic - I usually file whitepapers and presentations separately, because I retrieve them in different contexts (so if I need to re-use something, I'll go into "Presentation Resources/Infrastructure Automation" and that sort of thing).

Most project work, however, ends up on Teams/Sharepoint/whatever the customer wants, and teamwork patterns vary _a lot_, so I'm very dependent on searching for stuff anyway.

(comment deleted)
I basically just use two roots - documents and projects. Documents is stuff that gets backed up, including stuff related to projects but not in a repo, and projects is anything from a repo.

Within each, there's subfolders for each client, by name. Within each of those, there's subfolders for each project. I used to do one subfolder like "{client} - {project}", but I find that it's easier to type a couple letters of the client name, then the enter key, then a couple letters of the project name. As opposed to having to type the entire client name, plus space-dash-space, just to get to the project names.

Everything else non-project related is, admittedly, a dumpster-fire on my FS. Thank goodness for Everything [0].

[0] https://www.voidtools.com/