3 ms·
Have you ever needed to perform a reliable recursive directory copy between two drives on Windows? I have and it turned out to be a comically complicated task.
by jupp0r 3y ago
Have you ever needed to perform a reliable recursive directory copy between two drives on Windows? I have and it turned out to be a comically complicated task. Robocopy helps but als has its edge cases you need to handle. Also long path names become problematic (MAX_PATH etc).
- jwells89 3y agoI don’t know how Windows users deal with file copying being as bad as it is and has been there for so long. Linux can have issues here too though, depending on the file manager being used. Some file managers there still have weirdly bad copy/move handling.
- leptons 3y agoWhat are you even talking about? Copying folders on Winfows just works. Please explain.
- johnwalkr 3y agoBy default there is a path character limit of 260 characters, although there is a method to increase it. So if you try to copy something with a long filename that is many nested folders deep, it will fail. In one office, I had a coworker who used very descriptive folder/subfolder names for everything, and he constantly had this issue.
- jupp0r 3y agoThe problem is that lots of older software allocates fixed size path buffers (mostly on the stack) that uses the MAX_PATH macro (which is set to 260). Fixing this requires recompilation.
- jupp0r 3y agoNo it doesn't. Try setting up Windows CI for a large code base, good luck. I couldn't believe this is an actual problem in 2024 either, but unfortunately it is, depending in what tools you use (Visual Studio and most Microsoft Dev tooling works great, anything cross platform is hit and miss). Just read the limitations section of this: https://en.m.wikipedia.org/wiki/Robocopy https://en.m.wikipedia.org/wiki/Robocopy
- ricardobeat 3y agoThe comment I replied to was arguing that Mac file management sucks, no the other way around.