file - Maximum Length For Filename -
what maximum length allowed filenames? , max different different operating system? i'm asking because have trouble creating or deleting files, , suspect error because of long file names.
1. creating:
i wrote program read xml source , save copy of file. xml contains hundreds of <document>
, , each have childnode <name>
, <format>
, saved file named based on read in xml. example, if have code below, save file called test.txt
<document> <name>test</name> <format>.txt</format> </document>
i declared counter in code, , found out not files saved. after going through large xml file, found out program fail save files <name>
whole paragraph long. modify code save different name if <name>
longer 15 characters, , went through no problem. think issue filename long.
2. deleting
i found random file on computer, , not able delete it. error says file name long, if rename file 1 character. file doesn't take space, annoying being there , not doing anything.
so overall question is: maximum , minimum length filenames? differ based on operating system? , how can delete file mentioned in 2?
it depends on filesystem. have here: http://en.wikipedia.org/wiki/comparison_of_file_systems#limits
255 characters common maximum length these days.
Comments
Post a Comment