← Back to context

Comment by jupp0r

3 months 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).

I 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.

What are you even talking about? Copying folders on Winfows just works. Please explain.

  • By 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.

    • The 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.

  • No 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