Windows 7 Forums


Reply
Thread Tools

Deleting files with VERY long file names

 
 
Alf
Guest
Posts: n/a
Thanked:
 
      02-13-2011
I have picked up a few files with very long names that Windows 7 will not delete (error message indicating that file names are too long). So far I have tried (1) rebooting, (2) moving or changing the
files names--will not work because I get a Windows error sound by just clicking on the files, and (3) using CMD to try to delete the files with old DOS commands--still get an error message re length
of the files.

I would appreciate any suggestions. TIA. --Alf


--
--------------------------------- --- -- -
Posted with NewsLeecher v5.0 Beta 1
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

 
Reply With Quote
 
 
 
 
Paul
Guest
Posts: n/a
Thanked:
 
      02-13-2011
Alf wrote:
> I have picked up a few files with very long names that Windows 7 will not delete (error message indicating that file names are too long). So far I have tried (1) rebooting, (2) moving or changing the
> files names--will not work because I get a Windows error sound by just clicking on the files, and (3) using CMD to try to delete the files with old DOS commands--still get an error message re length
> of the files.
>
> I would appreciate any suggestions. TIA. --Alf


The best way to fix it, is to rename the file first, so that
it uses a shorter name. Then it can be deleted.

I tested that using the PERL programming language (ActiveState
PERL is a free download). I was able to create a 259 character
pathname, which explorer wouldn't delete (threw the kind of error
you're seeing). By running my script a second time, I was able
to use the PERL "rename" command, to change the name to something
shorter. In my testing, it seemed there was one particular
length that other programs can produce, that Explorer cannot
delete. I'd say that is a pretty long standing bug, in terms
of a lack of performance on Microsoft's part. The OS should
be able to do at least as well, as any other utility can do.

What it boils down to, is selecting a tool that doesn't use
the standard way of doing things. And thereby avoiding the
bug/shortcoming.

An example someone suggested in the past was "MP3rename", but
when you look at some utilities like that, their function and
interface are pretty far removed from your request for
a simple tool to delete that file. Using PERL is
equally far fetched - I used that environment, just to do
some quick testing, and it wasn't an attempt to write my
own tool or anything. Just to see "what happens at 259".

Paul

 
Reply With Quote
 
 
 
 
Clog_-_wog (®)
Guest
Posts: n/a
Thanked:
 
      02-13-2011
"Alf" <> schreef in bericht
news:KfO5p.87891$...
>I have picked up a few files with very long names that Windows 7 will not
>delete (error message indicating that file names are too long). So far I
>have tried (1) rebooting, (2) moving or changing the
> files names--will not work because I get a Windows error sound by just
> clicking on the files, and (3) using CMD to try to delete the files with
> old DOS commands--still get an error message re length
> of the files.
>
> I would appreciate any suggestions. TIA. --Alf
>

Use Unlocker
http://www.filehippo.com/download_unlocker/

[q]
Cannot delete folder: It is being used by another person or program
Cannot delete file: Access is denied
There has been a sharing violation.
The source or destination file may be in use.
The file is in use by another program or user.
Make sure the disk is not full or write-protected and that the file is not
currently in use.

Unlocker can help! Simply right-click the folder or file and select
Unlocker. If the folder or file is locked, a window listing of lockers will
appear. Simply click Unlock All and you are done!
[q/]

 
Reply With Quote
 
GlowingBlueMist
Guest
Posts: n/a
Thanked:
 
      02-13-2011
On 2/13/2011 4:20 AM, Alf wrote:
> I have picked up a few files with very long names that Windows 7 will not delete (error message indicating that file names are too long). So far I have tried (1) rebooting, (2) moving or changing the
> files names--will not work because I get a Windows error sound by just clicking on the files, and (3) using CMD to try to delete the files with old DOS commands--still get an error message re length
> of the files.
>
> I would appreciate any suggestions. TIA. --Alf
>
>

When in DOS or the Command Prompt as Windows 7 calls it did you try
deleting the file with the long name by using the short name as shown
with a dir /x while in the directory with the bad file?

The short name shown with the /x option will be a form of the long name
but limited to 8 characters.

 
Reply With Quote
 
Andrew Rossmann
Guest
Posts: n/a
Thanked:
 
      02-13-2011
article <KfO5p.87891$>,
says...
>
> I have picked up a few files with very long names that Windows 7 will not delete (error message indicating that file names are too long). So far I have tried (1) rebooting, (2) moving or changing the
> files names--will not work because I get a Windows error sound by just clicking on the files, and (3) using CMD to try to delete the files with old DOS commands--still get an error message re length
> of the files.
>
> I would appreciate any suggestions. TIA. --Alf


It's possible tht total folder name + file name is too long? If so, you
can temporarily try MOVING the folder the file is in to the root or some
other very short name, deleting or renaming the problem file(s), then
moving the folder back.

--
If there is a no_junk in my address, please REMOVE it before replying!
All junk mail senders will be prosecuted to the fullest extent of the
law!!
http://home.comcast.net/~andyross
 
Reply With Quote
 
Alf
Guest
Posts: n/a
Thanked:
 
      02-14-2011
I didn't try Unlocker (even though I use it) because I had to be able to right click on the file to bring up Unlocker in the context menu and couldn't do that (error sound). I did, however, try
Unlocker on the folder. When it didn't find anything locked it gave me the option to delete. I tried it and voila! Thanks!

And thanks to the other posters that responded.

Alf


--
--------------------------------- --- -- -
Posted with NewsLeecher v5.0 Beta 1
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

 
Reply With Quote
 
R. C. White
Guest
Posts: n/a
Thanked:
 
      02-14-2011
Hi, Alf.

As suggested by GlowingBlueMist and Andrew Rossman, you can use the Command
Prompt and those old DOS commands to delete those files.

First, navigate (CD for Change Directory) to the directory where those files
reside. If your foldernames are too long for CD to do it in one fell swoop,
you can CD one level at a time to get there.

Then remember the /x switch with the Dir command. This lists the SFN (Short
File Name) for any file whose LFN (Long File Name) does not comply with the
ancient 8.3 filename rules. (For those reading along, even a
single-character filename can be an LFN if that single character is one that
does not comply with the 8.3 rules.) The SFN will be in a column before the
LFN, but only for LFNs that don't also qualify as SFNs.

If your folder has too many files to comfortably use dir /x for the whole
list, then use a wildcard to shorten the list; it should still work. This
command produces the SFN for both Program Files (PROGRA~1) and Program Files
(x86) (PROGRA~2) in my Windows folder:
Dir pro* /x

Then just use the Del command with the SFN: del PROGRA~1

If you need to get rid of a folder, rather than a file, remember to use rd
(Remove Directory) rather than Del.

As usual in a Command Prompt window, just type any command followed by /? to
see a mini-Help file listing the switches and parameters available with that
command.

RC
--
R. C. White, CPA
San Marcos, TX

Microsoft Windows MVP (2002-9/30/10)
Windows Live Mail Version 2011 (Build 15.4.3508.1109) in Win7 Ultimate x64
SP1 RC


"Alf" wrote in message
news:KfO5p.87891$...

I have picked up a few files with very long names that Windows 7 will not
delete (error message indicating that file names are too long). So far I
have tried (1) rebooting, (2) moving or changing the
files names--will not work because I get a Windows error sound by just
clicking on the files, and (3) using CMD to try to delete the files with old
DOS commands--still get an error message re length
of the files.

I would appreciate any suggestions. TIA. --Alf

 
Reply With Quote
 
Clog_-_wog (®)
Guest
Posts: n/a
Thanked:
 
      02-14-2011
"Alf" <> schreef in bericht
news:Ai86p.115923$...
>I didn't try Unlocker (even though I use it) because I had to be able to
>right click on the file to bring up Unlocker in the context menu and
>couldn't do that (error sound). I did, however, try
> Unlocker on the folder. When it didn't find anything locked it gave me the
> option to delete. I tried it and voila! Thanks!


Anytime, sir!
>
> And thanks to the other posters that responded.
>
> Alf
>


 
Reply With Quote
 
danielfird
Guest
Posts: n/a
Thanked:
 
      03-08-2012
Alf wrote on 02/13/2011 05:20 ET
> I have picked up a few files with very long names that Windows 7 will no
> delete (error message indicating that file names are too long). So far I hav
> tried (1) rebooting, (2) moving or changing th
> files names--will not work because I get a Windows error sound by jus

clickin
> on the files, and (3) using CMD to try to delete the files with old DO
> commands--still get an error message re lengt
> of the files
>
> I would appreciate any suggestions. TIA. --Al
>
>
> Posted with NewsLeecher v5.0 Beta
> Web @ http://www.newsleecher.com/?usene
>

Hi all, I have been suffering from accessing, managing and even renaming file
that have more than 255 characters over a long time. I have tried various way
but failed. Then I have searched this problem in internet. Then I have found
solution. This software is very easy to use. Named Long path Tool. To use th
program all you need to do is to download this program online and save all th
settings to your computer. This program is compatible with Windows NT, 2000
XP
Vista and Windows 7. you can find it from longpathtool(dot)co

best regard
DanielFird
 
Reply With Quote
 
Jeff Layman
Guest
Posts: n/a
Thanked:
 
      03-08-2012
On 08/03/2012 12:57, danielfird wrote:
> Alf wrote on 02/13/2011 05:20 ET :
>> I have picked up a few files with very long names that Windows 7 will not
>> delete (error message indicating that file names are too long). So far I have
>> tried (1) rebooting, (2) moving or changing the
>> files names--will not work because I get a Windows error sound by just

> clicking
>> on the files, and (3) using CMD to try to delete the files with old DOS
>> commands--still get an error message re length
>> of the files.
>>
>> I would appreciate any suggestions. TIA. --Alf
>>
>>
>> Posted with NewsLeecher v5.0 Beta 1
>> Web @ http://www.newsleecher.com/?usenet
>>

> Hi all, I have been suffering from accessing, managing and even renaming files
> that have more than 255 characters over a long time. I have tried various ways
> but failed. Then I have searched this problem in internet. Then I have found a
> solution. This software is very easy to use. Named Long path Tool. To use the
> program all you need to do is to download this program online and save all the
> settings to your computer. This program is compatible with Windows NT, 2000,
> XP,
> Vista and Windows 7. you can find it from longpathtool(dot)com


I have seen this issue with XP. I can't remember how I resolved it, but
it definitely didn't require a third-party utility. I seem to remember
that a bigger issue was with CDs or DVDs, which would not accept file
names longer than 64 characters.

--

Jeff
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
File names with a period aren't saving correctly VR4Jen Windows 7 Support 8 11-07-2012 11:42 PM
Windows should increment file names Metspitzer alt.windows7.general 60 04-12-2012 12:52 AM
Windows 7 long file names and databases. Peter Jason alt.windows7.general 19 09-16-2011 08:18 PM
Printer printing very very light ErrorMagnet Off-Topic Discussion 0 06-28-2011 08:37 PM
File Names In Windows Explorer Darth Raider alt.windows7.general 11 10-29-2010 11:47 PM


All times are GMT +1. The time now is 07:31 PM.
W7Forums is an independent website and is not affiliated with Microsoft Corporation.