path/filename too long Topic is solved

Using PhotoRec to recover lost data
Locked
Message
Author
TJBaker57
Posts: 2
Joined: 06 Mar 2016, 21:07

path/filename too long

#1 Post by TJBaker57 » 06 Mar 2016, 21:15

Hello and thanks for the Testdisk software!

I am currently copying files from an exfat drive that lost power during file write operations. I am copying by manually listing and selecting files for copy. Occasionally I errantly select a directory that contains trashed fat data and I end up with a raft of files and directories that cannot be deleted. Windows mostly reports the file cannot be found. Other software reports the path, filename or both are too long. (Makes me wonder how those files get created!)

How does one get rid of these?

TJ Baker

Sponsored links

User avatar
cgrenier
Site Admin
Posts: 3555
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: path/filename too long

#2 Post by cgrenier » 07 Mar 2016, 19:18

Try "cmd", use "dir", "cd directory_name" and "del /r dir_name" to delete them.

TJBaker57
Posts: 2
Joined: 06 Mar 2016, 21:07

Re: path/filename too long  Topic is solved

#3 Post by TJBaker57 » 07 Mar 2016, 20:07

Thanks for the suggestion. I had tried all manner of approaches and any attempt to rename, delete, or whatever failed from both command line and windows explorer.

Eventually I came upon a web post that recommended robocopy since that uses a different method of addressing files where the name length is not an issue. In short, using robocopys ability to mirror a directory to a target allows one to mirror an empty directory to the directory containing the file(s) you need to be rid of. Just be certain to copy out any other files in there you need before you do this.

Mkdir empty_dir
Robocopy empty_dir directory_with_long_filenames /s /mir
Rd empty_dir

This quickly blew away everything that had refused to be deleted by any other means.

Locked

Who is online

Users browsing this forum: No registered users and 1 guest