Welcome to WebmasterWorld Guest from 54.162.139.217

Forum Moderators: bill

Message Too Old, No Replies

file whose path is too long for the Recycle Bin

I want to find the file and rename it

     
8:42 am on Mar 28, 2008 (gmt 0)

Moderator from US 

WebmasterWorld Administrator robert_charlton is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 11, 2000
posts:11865
votes: 291


On a Windows XP machine... for simple on-computer data backups, I have a second hard-drive on my machine and routinely copy over my working data to a new folder on it and then delete the old.

Each time I delete the old, though, I trip over one file (I'm guessing one, anyway) whose path, I assume, is too long, and I get a message to the effect that Windows cannot delete "items whose name is too long for the Recycle Bin. Do you want to permanently delete it?" Pain.

I click "yes to all" and everything is fine, but I've got to keep an eye on things and do this manually, every time. I'd like to find the d**** file and rename it, but haven't figured out how to do it.

I should mention that I've already set the target for "My Documents" to a very short name... in my case d:\mydocs\

I'm guessing that this problem is due to probably one file that was automatically named by some app. I'm just trying to locate it. I think Total Commander will rename or delete it after that. If not, I'll need to come back for more advice.

Any thoughts for finding it, somewhere among a great many folders, in some automated way?

9:48 am on Mar 28, 2008 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10888
votes: 72


i don't think the length of directory name matters.
i'm going to guess you are hitting a windows kernel limit - maybe 255 or so?
try doing a windows file name search for all files with more than 255 characters using filename wildcarding:
?...(for a total of 255 consecutive question marks)...?*
9:59 am on Mar 28, 2008 (gmt 0)

Senior Member

joined:Jan 27, 2003
posts:2534
votes: 0


If you use a file search that supports regex you specify how many characters to using quantifiers, e.g. {255,} for 255 characters or more.
10:34 am on Mar 28, 2008 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10888
votes: 72


just to be clear i was referring to the regular windows start/search "feature" which is far too simple to support regex.
12:35 pm on Mar 28, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 2, 2003
posts:3710
votes: 0


The maximum length of a filename in Windows is 260 (including the drive letter, full directory path, etc). This limit can be exceeded by unicode versions of various API functions.

Try chkdsk.exe - its a standard Windows component that can be run from cmd.exe. You may need to use an extra switch or two, I'm not sure.

Kaled.

6:52 pm on Mar 28, 2008 (gmt 0)

Moderator from US 

WebmasterWorld Administrator robert_charlton is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 11, 2000
posts:11865
votes: 291


Whether 255 or 260, yes, I'm sure that's what's triggering the message. I'd even be happy to locate everything over 240 (just in case the length is temperature sensitive. ;) )

try doing a windows file name search for all files with more than 255 characters using filename wildcarding:
?...(for a total of 255 consecutive question marks)...?*

Intriguing idea... worth a shot.

I don't offhand understand how I'd use chkdsk.exe to find a long file.

4:29 am on Mar 29, 2008 (gmt 0)

Moderator from US 

WebmasterWorld Administrator robert_charlton is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 11, 2000
posts:11865
votes: 291


It turns out that the Recycle Bin has a shorter length limitation than the Windows kernel limit. I couldn't find anything with 255 characters, so I kept nibbling down until I jumped down to 100 question marks and came up with one folder, which I've renamed to something much shorter. I should have tried deleting the backup first, but I'll know soon enough if that was it, when I next delete \mydocs-BU\.

The long name, incidentally, came from a test in which I'd used IE to save a client's original home page to disk, and it named the folder for the original home page title... probably 150 characters long. ;)

I'd never noticed the folder name because the display was truncated and buried in a project subfolder.

[edited by: Robert_Charlton at 4:31 am (utc) on Mar. 29, 2008]

7:40 pm on Mar 30, 2008 (gmt 0)

Moderator from US 

WebmasterWorld Administrator robert_charlton is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 11, 2000
posts:11865
votes: 291


PS - Deleting the old backup folder last night worked without a glitch. Thanks.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members