Skip to content

Instantly share code, notes, and snippets.

@rohitfarmer
Last active August 31, 2022 18:00
Show Gist options
  • Save rohitfarmer/ca669cb9a907e12f0cacf61d088672d7 to your computer and use it in GitHub Desktop.
Save rohitfarmer/ca669cb9a907e12f0cacf61d088672d7 to your computer and use it in GitHub Desktop.
Rules for naming files and folders that are cross platform.

Rules for Naming Files and Folders that are Cross Platform

Use styles that are internationally recognized, easy to read by a human eye, and require fewer finger movements on the keyboard, for example, using lowercase letters that eliminate the shift key.

  1. Use all lowercase letters.
  2. Use hyphens (not underscores) to separate words. Avoid using spaces as they are difficult to work with on the command line.
  3. Use YYYY-MM-DD format for dates. It is adapted from https://www.iso.org/iso-8601-date-and-time-format.html.
  4. While using the date at the beginning of a file name, keep the rest of the file name the same as the one created on a previous date (if there is more than one file for the same purpose, but it is sectioned according to the date.)
  5. Use "." only for file extensions.
  6. Use v1, v2, ..., vn to denote file versions.
  7. For a stack of fewer than 100 files, number them as 00, 01, 02, ..., 0n for easier sorting. Accordingly, for a stack of fewer than 1000 files, number them as 000, 001, 002, ..., 00n.
  8. File names should NOT contain punctuation, symbols, or special characters. ” / \ [ ] : ; | = _ , < ? > & $ # ! ‘ { } ( ).

Some Examples

2022-08-31-labnotebook-for-hdstim.docx

figure-01.png
figure-02.png
figure-03.png

/path/to/folder/exploring-flow

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment