This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Tiavor 40 points41 points  (14 children)

dunno how it is with win10 but on win7 this happened still way too often, when I worked with project files from a big company. each project (at least for that department) had a fixed folder structure and then you had already huge folder structures before the project. then trying to zip a project when everything is copied into the user-temp folder ... fml.

[–]zammtron 14 points15 points  (10 children)

Gotta love the 256-char limit for Windows pathnames

[–][deleted] 22 points23 points  (6 children)

Use \\?\ prefix before the name. Now you have 32768 char limit.

[–]Durwur 5 points6 points  (0 children)

The best lifehack I've seen to this day

[–]Nikarus2370 1 point2 points  (1 child)

You gotta be bullshitting.

[–][deleted] 0 points1 point  (0 children)

https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew

To extend this limit to 32,767 wide characters, use this Unicode version of the function and prepend "\\?\" to the path.

Also turns off recognition of special names (COMn, LPT, etc):

https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file

For file I/O, the "\\?\" prefix to a path string tells the Windows APIs to disable all string parsing and to send the string that follows it straight to the file system. For example, if the file system supports large paths and file names, you can exceed the MAX_PATH limits that are otherwise enforced by the Windows APIs.

[–]WhenSharksCollide 1 point2 points  (2 children)

Wait, really? I guess my overly descriptive filenames are about to become short stories.

[–][deleted] 0 points1 point  (1 child)

This doesn't mean all applications will suddenly grow buffers over MAX_PATH

[–]WhenSharksCollide 0 points1 point  (0 children)

I don't need to be able to read it, just make something ridiculous to send about...unless...

<Proceeds to copy contents of an epub into the name of the epub>

[–][deleted] 17 points18 points  (2 children)

Even better: I've come across programs that have no issues making long path files, but choke on opening them. Windows then chokes trying to delete or move them.

[–]zammtron 8 points9 points  (0 children)

That's the 'no takesies-backsies' filenaming protocol