DEV Community

Ajeeb.K.P
Ajeeb.K.P

Posted on

1

File or folder naming

Intro

This is not a serious issue. I was curious wheather using hyphen(-) in file nameing good or not. So, I searched and found an answer.

Good Naming

this is a range of characters that can be considered safe:

Letters (a-z A-Z) - Unicode characters as well, if needed
Digits (0-9)
Underscore (_)
Hyphen (-)
Space
Dot (.)
Enter fullscreen mode Exit fullscreen mode

The forbidden printable ASCII characters are:

Linux/Unix:

/ (forward slash)

Windows:

< (less than)
> (greater than)
: (colon - sometimes works, but is actually NTFS Alternate Data Streams)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)
Enter fullscreen mode Exit fullscreen mode

As Mac is considered under unix family, I guess this works with Mac too.

Links

https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names
https://support.office.com/en-us/article/Invalid-file-names-and-file-types-in-OneDrive-OneDrive-for-Business-and-SharePoint-64883a5d-228e-48f5-b3d2-eb39e07630fa
https://sharepoint.stackexchange.com/questions/151575/which-characters-are-allowed-in-file-folder-names-in-sharepoint

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Retry later