DEV Community

loading...

File or folder naming

Ajeeb.K.P
Muslim, Husband, Programmer, Indian/Kerala. Speaks English, Malayalam. Always curious about technology, computing etc.
・1 min read

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 (.)

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)

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

Discussion (0)