Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I explain my colleagues that filenames should not contain uppercase characters or special characters?

For what I know, it's best practice to name files like this: file_name.txt - or if you want to file-name.txt.

Now some people seem to like to name their files fileName.txt or FILENAME.TXT or "File Name.txt" - how do explain them that it's not a good idea? Why exactly is the aforementioned file naming best practice?

I only vaguely know some file systems have trouble with uppercase, and that URIs should be lowercase only to avoid confusion (Wikipedia does have uppercase characters in their URLs though e.g. http://en.wikipedia.org/wiki/Sinusitis )

W.

like image 593
Wolfr Avatar asked Oct 20 '09 11:10

Wolfr


1 Answers

Well, a problem with uppercase letters would be that some filesystems (like NTFS) ignore them and treat filename.txt and FILENAME.TXT as the same file, whereas other filesystems (ext for example, I think) thinks of these as 2 different files.

So, if you have some reference to a file that you called file.txt, and the reference points to the file File.txt, then on NTFS this would be no problem, but if you copy the files to a file system like ext, the reference would fail because the filesystem thinks there is no such file as File.txt.

Because of this, it's best practice to always use lowercase letters.

like image 166
Maximilian Mayerl Avatar answered Nov 15 '22 07:11

Maximilian Mayerl