What are the best practices for naming files and folders?

To ensure smooth file saving, accessibility, and compatibility across different systems, it's important to follow best practices when naming files and directories.

Why Proper File Naming Matters

Proper file naming is essential for ensuring files are accessible and compatible across different platforms and systems. Without adhering to naming conventions, files can fail to save, become inaccessible, or cause errors when shared or transferred. Following a simple set of best practices will prevent these issues and ensure smooth operations.

Characters to Avoid in File and Directory Names

Different operating systems and applications may have restrictions on certain characters in filenames. To avoid potential issues, it’s best to steer clear of the following:

  • Special characters and symbols: These characters are commonly not supported across various systems and can result in errors: # % & { } \ < > * ? / $ ! ' " : @ + | =

  • Emojis and alt codes: Although widely used in communication, emojis and special alt codes may not be recognized by all systems, leading to compatibility issues.

  • Spaces at the end of filenames: This is particularly problematic across different applications and can cause files to become inaccessible. It’s highly recommended to avoid adding spaces at the end of filenames.


Safe Characters to Use

To ensure compatibility across all platforms, only a few characters are guaranteed to be safe for use in filenames:

  • Underscore (_): This is a reliable substitute for spaces and can be used freely in filenames.

  • Dash (-): Another safe character, often used to separate words in filenames.


Additional File Naming Tips

  • Keep filenames short but descriptive: Long filenames can cause issues with certain systems or file sharing platforms. Use key terms that describe the content of the file while keeping the name concise.

  • Be consistent: Use consistent naming conventions for your files and directories to make them easier to find and manage.

  • Avoid dates and version numbers when possible: Instead of including year or version numbers, overwrite the old file with the new version. This keeps file paths cleaner and easier to manage.

  • Lowercase letters: Use lowercase for simplicity and consistency across different systems.


Final Note: Not All Characters are Safe

Just because a character isn’t listed above doesn’t mean it’s safe to use. When in doubt, stick to simple, standard characters. The safest options are always underscores _ and dashes -, which work across all platforms without issue.


By following these file naming conventions, you’ll reduce the risk of errors, ensure compatibility, and maintain a more organized and efficient system for saving and sharing files.

Last updated