Rules

Secret ingredients to quality software

Do you remove spaces from folders and files names?

Last updated by Tiago Ara├║jo [SSW] on 26 Mar 2021 06:33 am (8 months ago) See History

It is not a good idea to have spaces in a folder or file name as they don't translate to URLs very well and can even cause technical problems.

Instead of using spaces, we recommend:

  • kebab-case - using dashes between words

Other not recommended options include:

  • CamelCase - using the first letter of each word in uppercase and the rest of the word in lowercase
  • Snake_Case - using underscores between words

For further information, read Do you know how to name documents?

This rule should apply to any file or folder that is on the web. This includes Azure DevOps Team Project names and SharePoint Pages.

  • extremeemailsversion1.2.doc
  • Extreme Emails version 1.2.doc

Figure: Bad Examples - File names have spaces or dots

  • extreme-emails-v1-2.doc
  • Extreme-Emails-v1-2.doc

Figure: Good Examples - File names have dashes instead of spaces

  • sharepoint.ssw.com.au/Training/UTSNET/Pages/UTS%20NET%20Short%20Course.aspx
  • fileserver/Shared%20Documents/Ignite%20Brisbane%20Talk.docx

Figure: Bad Examples - File names have been published to the web with spaces so the URLs look ugly and are hard to read

  • sharepoint.ssw.com.au/Training/UTS-NET/Pages/UTS-NET-Short-Course.aspx
  • fileserver/Shared-Documents/Ignite-Brisbane-Talk.docx"

Figure: Good Examples - File names have no spaces so are much easier to read

Adam CoganAdam Cogan
Matt WicksMatt Wicks

We open source. Powered by GitHub