I need to flatten a directory structure. I have a very large directory with 6000+ directories and 40000+ files. Some are 12 levels deep and have files in them. The paths exceed 255 character limits and if you add the file names, some are 400 characters +. copy and xcopy will not work for this task. I tried a For /R loop with copy and xcopy and they fail at going beyond 255 character paths. I receive a file not found error. I know that robocopy is good for 36000 characters, so it seems to be the only option. is there anyway to script this in powershell or batch, vb? every variation I have tried copies the directory structure along with the files.
any help is appreciated.