deleting file whose path is already too long

J

John Monroe

Not sure how it happened, but a user created a file in an
NTFS LAN folder whose path is longer than 256 characters.

How to delete or rename it to something shorter?

I can't even get its properties from cmd.exe or Windows
Explorer.

thx,

John
 
B

Brian [MSFT]

One simple method I've used in the past to manage folder trees longer than
MAX_PATH is to break the trees into chunks. So..
Traverse the directory as deep as you can within Explorer or the command
shell. Then move all the contents below it to the root of the drive (or a
folder under the root) so you now have a second directory tree. If the new
tree is still greater than MAX_PATH, repeat until you get a manageable tree.
What you do with the multiple directory trees is your business, but at least
they're manageable :).

--
Brian [MSFT]

Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights. Please do not send e-mail directly to this alias. This alias is
for newsgroup purposes only.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top