Live data from Hacker News

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

news.ycombinator.com

51–60 of 182 posts

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

#51
Summary: By project, alphabetically, flat within reason, with an Archive subfolder for old projects. Different locations for code vs documents.

Details, starting with documents:

I usually know what the thing I'm looking for is called, so hierarchy gets in the way more than it helps.

My documents live in[1] ~/nextcloud/, organized in a flat structure by project, with 3 exceptions, where I add one more level of hierarchy:

1. There is also a folder called `Archive` (the only capitalized folder, to avoid accidental autocompletion), where I move old, inactive projects — this keeps the flat list from getting too large to navigate (the Archive folder becomes harder to navigate, but I seldom open it so that doesn't matter).

2. When a large number of projects (significant % of total folders) fall under the same umbrella. So far this has only applied to school. Inside my `school` folder, the classes themselves were still organized in a flat structure by course dept-number (eg, comp115, ec6), rather than by semester. Another separate folder with the same structure for high school; both are currently archived.

3. When it makes sense to use a different organizational method. Again, just one case where this applies: job applications, which are organized flatly by year-quarter-company (all in the file name).

[1] synced between my computers using nextcloud, as you may have guessed. Nextcloud doesn't mandate this and previously I used ~/Documents, but I prefer lowercase folder names — caps are more work to type in the terminal.

---

My code uses a very similar system but with fewer exceptions:

Repos that I contribute code to (mine or I forked them) live in ~/dev/

Repos that I am using as-is (I wanted to build and use a tool, wanted to be able to `git grep` instead of using github/gitlab search, etc) or that I touch very infrequently (eg, fdroiddata) live in ~/repos/. This is kind of equivalent to my archive folder.

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

#52
post #50

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 somewh…

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…

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.

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

#54
Common things are simply by category and subcategories starting from the media/file "type" (e.g. books, photos, etc).

Projects are created in a ~/playground directory and are eventually moved to a ~/projects one (but sometimes they just stay in a RAM-disk; i.e. experiments).

Within coding projects I usually have /src, /doc (by category and subcategories) and /utils (with utility scripts, Docker-related files, etc) sub-directories.

PDF et similia that don't fit within a specific project typically are generic enough to be placed somewhere under ~/books.

The main issue with this system is that there could be work-related things under distinct paths (e.g. ~/documents/work/ and ~/projects/), but those may be archived together...

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

#57
post #33

First thing to do, is to create a new "homedir" inside the OS-provided homedir. I want my homedir to be immediately backup-able, and unfortunately most OSs spam the system homedir with various nonsense, e.g. applications (on Mac, Chrome installs (or used to) in `~/.ApplicationData`, on Linux, there's various package managers' binary caches, ...). I used to name this `home` but next time I'll name it `my`, less confus…

> First thing to do, is to create a new "homedir" inside the OS-provided homedir. I want my homedir to be immediately backup-able, and unfortunately most OSs spam the system homedir with various nonsense, e.g. applications (on Mac, Chrome installs (or used to) in `~/.ApplicationData`, on Linux, there's various package managers' binary caches, ...). I used to name this `home` but next time I'll name it `my`, less conf…

Yes, I do not want gigabytes of cache files in my homedir.

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

#58
If it's a big project, it gets its own repo.

If it's a small project, it goes into my single big repo for all small projects.

For reference material (I accumulate tons of PDFs) it goes into OneDrive and I put a link to the file in my wiki. This wiki is stored inside the same repo I use for my small projects.

Notes go into the small project repo as well.

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

#59

`ag -g 'some-piece-of-the-name-that-seems-kind-of-likely'` [0] [0] https://github.com/ggreer/the_silver_searcher

You should try ripgrep

Why? It has pretty much the same functionality as ag and comparable speed.
Post reply on HN