Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Windows HandBrakeCLI - Long file names/paths supported? #2157
Description of the problem
I was just wondering if HandBrakeCLI supports 260+ character file paths/names? It doesn't seem to but thought I'd ask in case there's a specific way. Thanks.
HandBrake version (e.g., 1.0.0)
Operating system and version (e.g., Ubuntu 18.04 LTS, macOS 10.14 Mojave, Windows 10 1809)
Windows 10 17763
Have you tried the work-around for CMD.EXE mentioned in some of the Microsoft pages of prefacing paths with "\?" to force use of the 64-bit file path API? What I'm reading indicates that CMD.EXE still uses the 32-bit API even on a 64-bit installation, if drive letters are used. The "\?" in front of the path overrides that.
I can't test, because I don't have anything with super-long paths anymore.
OK, let me try this differently - the work around prefix is two backslashes, a question mark, and another backslash. I guess to enter it here I have to use \\?\ to have it display correctly.
However, I don't know off the top of my head if any of our 3rd party libraries are using older API's which don't support long paths.
I pulled the latest handbrake-master source and there is no place that MAX_PATH is used to set a 260-character limit.
A good test to see if it's CMD.EXE doing the limitation would be to try running under PowerShell, which supposedly gives you access to the full Win32 API. Although I have not seen any of the "break the limit" messages mention PowerShell...