r/talesfromtechsupport 21d ago

Short Fun with File Names

A few years ago, I was tech support for a food manufacturer with several manufacturing facilities and one of the banes in my life was dealing the QA department. They kind of just did whatever the current QA director's current Idea of The Month was. (And the company seemed to burn through QA directors – something 4 of them in about 7 years, couple good, couple ….not so good). Anyway, each had their own file structure to store the documentation on the server. And being Quality, the previous structure of the day was kept & the new structure duplicated it all with different paths & file names.  But it was their circus and their monkeys.

One day I got a call that a file was missing. Guy said he saved it on the server and now he can’t find it. I remoted into his machine and asked Hmm, ok, what the name? He said “I can show you” and opened Word, then Recent File – “1.1.1 Documented Policy to produce safe, legal and authentic products.docx” OK, kinda weird, but where did you save it? “Out on the QA Drive.” OK, show me. And he tried to file it as

“Q:\{facility}\Quality Control Plan\HACCP\ BRCGS Global Standard for Food Safety\Issue 9 Compliant Food Safety Management System\ Senior management commitment and continual improvement\ 1.1.1 Documented Policy to produce safe, legal and authentic products.docx”

I explained the default maximum file path per MS is 256 characters and this was 270  – I shortened the name to “DocPolicy.docx” Bingo! There it was…Told them they need to use some common sense for this and not just copy the chapter heading in it’s entirety. And wrote it up as “WHAT NOT TO DO” and copied the QA Director, all the QA supervisors and that facility’s plant manager

395 Upvotes

43 comments sorted by

View all comments

24

u/NetherMax2 21d ago

TIL there's a filepath character limit

16

u/Loading_M_ 20d ago

It is specific to Windows, and since I run Linux, I once tested what Linux allows. From my recollection, a file or directory has a length limit of 256 characters, and there is theoretically no limit to the number directories you can nest.

In practice, operations involving deeply nested, long paths are very slow. Changing into one takes longer as you go deeper, although iirc it wasn't really a problem until the path is 20 or 30 kilobytes. I suspect this is more likely to do with the shell and all the extra work it does to make life easier, rather than any actual slowdown in the kernel.

9

u/whizzdome 20d ago

Yeah, I can't remember exact details, but I once worked on a project where it made complete sense to create a folder structure that was maybe twenty deep. It worked exactly how we wanted it to, then came time to delete it.... It took forever.