It was painful when you need to copy large amount of data from one server to the other and came across this “file path too long” error. That means you will need to dig into each subfolder to either rename the file or zip them up. That would take all night if you have a lot of this errors. I had this problem today.
What I am doing is helping a client migrate Windows SBS 2008 to Windows SBS 2011. There are over 200G data to copy across. For the first couple of “file path too long” errors, I just mark them down until I find there are too many of them.
Quick search on Google leads me to RoboCopy . I have to say this is an excellent tool to handle exactly this case. Actually people are using this tool to do server backup too.
robocopy "\\server1\folder1" "D:\folder2" /e /z /dcopy:T /XO
A simple command line came to rescue. I can then sit back and enjoy my coffee.
Update: Just realise today that you can use robocopy to delete files as well:
create a empty folder and run this command:
robocopy e:\empty e:\to_delete /MIR /E