File names and directory names have maximum length restrictions in the operating system, and the maximum lengths are different in different systems.
These restrictions can be modified under Linux systems by modifying the system kernel.
The length limit of Linux file names is 255 characters
Fully qualified file names under windows must be less than 260 characters, and directory names must be less than 248 characters character.
win7x64-bit environment:
260 length is used as the total file name length limit.
For example: If the length of the folder is 50
, the length of the file name is limited to 210. If it exceeds, it will be truncated.
If in the program, MoveFile/CopyFile will return an error if the length exceeds, and the processing will fail.
The above is the detailed content of How many characters can a file or folder name have at most?. For more information, please follow other related articles on the PHP Chinese website!