Character means a single object used to represent text, numbers, symbols, or special characters. For example, the letter "a" is considered a single character, and the word "file976" is considered a string with 7 characters.
The filename is considered as a collection of characters to a unique identifier of the file in the electronic devices (e.g: computers, Phones). Two files in a same directory can not have same filename, but two files in different directories can have same filename.
Filename structure differs based on the usage and operating system of the devices. Commonly, a filename will have
1) Name - Primary name of the file
2) Extension - An extension to express the type of the file/execution pattern of the file/content of the file.
Name and extension are usually merged together by dot(".") to generate a common filename of the file.
|computer||.png||computer.png||Usually .png extension refers to image content|
|mycomputer||mycomputer||Some files can be without extension too|
|application||.exe||application.exe||Usually .exe refers to executable content|
|.env||.env||Usually .env refers to environment properties content, and name will be empty|
There is a confusion among filepath and filename. Actually filepath refers to the pathway from the origin of the user / operating system / startup folder to the current file, where filename refers to just the name of the file.
There is no universal rule that a filename can have this kind of letters or can only have this length of characters. But there is a limitation for the filename length on each operating system / runtime environment to support their internal strctures and data management.
|Operating System / Runtime Requirement||Filename maximum length|
|FAT 12 System||11|
|Early days of Unix||14|
|NTFS file system(Windows) / Mac OS||255|
Each operating system holds an internal data management nature with a larger scope to handle the files, and directories efficiently for the user actions. Each file will have the contents, and also will have some metadata like file name, file size, file extension, created, etc.
Meta data also will share some space from the storage to hold the file meta-data information, and will be used when ever it needed. In common practices, it's not advisable to keep the open limits for any data storage components, as it should have lower limit and upper limit. Likewise, the filename property also have a constraint as lower limit(minimum) and upper limit(maximum), which varies based on the operating system / runtime environment.
Most operating systems / runtime environments don't allow the users to customize the filename lengths, unless if it's a very customized environment for a specific usecase. Changing the filename length restrictions may affect the existing file's meta-data as well as allocated storages for the existing file meta data-conents - it's an extensive time consuming operation!
Filenames are considered as non-case sensitive components at all times, but in several cases it might be treated as case sensitive component (highly secured systems). E.g: Apple.png, APPLE.png, apple.png are referring to the same file.
Filenames can have any characters (letters, numbers, special characters) expect the following reserved charters.
Filename can have unicode characters as well. Some examples are
Let's assume there are two systems A, and B having two different filename constraints as follows
If you are copying or moving a file from System A to System B, there won't be any issues related to filenames as System B's filename can have more characters than System A's filename. Let's consider, if you are copying or moving a file from System B to System A where the filename has a length of 180 characters. You might get the following when you are initiating the action,
Each system follows their internal definitions to follow the pattern of adoption when there is a conflict in filename lengths.
Find out how to count characters in Excel and what formulas are needed
Find out what settings to navigate to in order to see a character count in Microsoft Word, both the desktop and mobile versions.