2018-06-01

filesystem organisation

examples for large file collections

general

categorisation

a directory name can be used to represent a category, and entries belong to that category. examples of how this can be used are shown in the following examples. if an entry of that directory does not belong to the category, it is in the wrong place, which means a directory "text-files" should not contain audio files for example to be consistent

path information duplication

paths can contain information that can subsequently be left out in file names. for example a path for music files could contain information like this "artist/artist.album/artist.album.1.flac". the path includes the artist and album name redundantly multiple times. it can be simplified to "artist/album/1.flac" without it becoming particularly less practical

rating

files and sub-directories can be "rated" by some quality like importance by using numeric directory names like 1, 2, 3, where 1 is "important" and 3 is "not important". this works well for dividing the set of files when they are accessed by importance, for example frequently listened to music and less frequently listened to music, or good and less good movies. ideal would be having right-click commands in the file manager to be able to say "rate this file 2", "rate +1" etc and the file gets moved to the other number directory while the same sub-directory hierarchy below is kept. 1/x/y/z becomes 2/x/y/z. nesting of numeric directories can be confusing since the difference between nested ratings like /1/3 and /2/1 becomes less and less clear for each nesting (it is like decimals. two is a typical maximum and one is usually enough)

dot separation

an example convention for filenames

only lowercase to not have a complicating mix of uppercase/lowercase characters

"/" as the separator for files and directories

"-" as the separator for combined words in file names

"." as the separator for tags or separate fields in file names

examples

artist.album.title.flac
picture/green.flower.bridge.jpg
2022-11-3.house.red-bricks.jpg

automatic classification

there are algorithms to calculate loudness and rhythm descriptors which could be used for sorting files. pixel width and height usually describe video quality better than other properties (bitrate, framerate). the sum of pixel width and height is a relatively short value that can be included in file names. it is a single value that sorts (640x480 would sort by width first) and is usually divisible by 1000 without rest (640+480 = 1000, 1280+720 = 2000, 1920+1080 = 3000). for example prepend strings like this to file names "pxs3000.", where pxs is an abbreviation for pixel sum that also makes it easier to remove it automatically. factors for different codecs could be used and the audio quality considered also

music collections

media-type > sub-type > rating > instrument > loudness/rhythm > artist > album album-release > track-number track-title

template

audio
  music non-music
    0 1 2 3 4
      electronic guitar ochestra jazz piano
        beat calm noisy other
          artist-name
            release-date.album-name other
              track-number.track-name
          various-artists
            album-name.release-date
              track-number.artist-name.track-name

examples

audio/music/1/electronic/calm/murcof/2007.cosmos/murcof.cosmos.03 cosmos i.flac
1
  electronic
    beat
    calm
      murcof
        2002.martes
        2007.cosmos
      vangelis
        "opera sauvage"
    noisy
    other
  guitar jazz orchestra other piano
2
  0
    unrated-album ...
  1
    electronic guitar jazz orchestra other piano

video collections

media-type > format > rating > title > season > episode

examples

video/tv-show/1/futurama/s05/2.mkv
video
  movie
    0 1 2
  tv-show
    1
      curb your enthusiasm
      futurama
        s01 s02 s03 s04
        s05
          1.mkv 2.mkv 3.mkv 4.mkv 5.mkv 6.mkv
      monkey dust
    2
  other
    youtube standup-comedy

general

audio
backup
documents
  editable uneditable
download
other
  other compressed
personal
  authored
    projects
      private public
  foreign
picture
temp
text
  machine-readable plain
  programming
    language-name
video

programming projects

exe license other readme.md source temp
project-name
  exe
    compile install test
  license
  other
  readme.md
  source
    c-precompiled
    sc
      derivatives
      foreign main test
    scheme
      sph/lists/filename.scm
      test/sph/lists/filename.scm
  submodules
    git-name
  tmp
    lib.so

modules directory

modules
  sph/lists/filename.scm
  test/sph/lists/filename.scm

home directory

/home/username
  .exe mnt tmp

projects directory

shortcut in home directory. p/pp: public project, p/p: private

/home/username/p/pp/project-name

variation

/home/username/p/customer-name/project-name

note about tagging filesystems

sometimes it would make sense to have the same file in multiple directories, if directories correspond to overlapping categories. this can be the case with things like musical genres, where one album can be of multiple genres, but also for accessing files by different facets, not just the ones that have been chosen for a path.

there are filesystems like tagsistant and i have not looked at it in depth. filesystem paths for tagging filesystems do not map 1:1 to posix paths, with some applications eventually not working correctly. for example when having paths that are tag filter queries at the same time. a path that displays all files with tag-1 and tag-2 for example could look like "music/tag-1/tag-2" but could also be written "music/tag-2/tag-1", because of the number of possible combinations, recursive directory search might become impractical. then what happens if a file is copied there, or a program that tries to create files with specific names and so on (like hidden cache files when editors save), or try to create symlinks. i don't know how current tag filesystems deal with this, maybe they are read-only and have a separate interface for file management

see also

filesystem hierarchy standard


tags: start document computer filesystem structure