Saturday, February 4, 2017

Filename too long

While recovering data from an old NAS, I encounter a folder that would not delete after being restored on a USB Drive.  The error Windows was throwing was:

The filename would be too long for the destination folder.   You can shorten the file name and try again...

After a bit of research, the following workaround was used to successfully delete the folder.

  • open a command prompt
  • cd into the nested directory folder (i went about half way down)
  • subst m: .
  • j:
  • rmdir /s remaining_folder_name
  • c:
  • subst /d m:
This effectively assigns part of the large nested directory folder to the m: drive, and allows you to switch to that drive and delete the remaining nested folder.

1 comment:

  1. Very informative and impressive post you have written, this is quite interesting and i have went through it completely, an upgraded information is shared, keep sharing such valuable information. Brisbane LED Flexible Strip Light

    ReplyDelete