Deleting files with VERY long file names

Discussion in 'alt.windows7.general' started by Alf, Feb 13, 2011.

  1. In message <>, Gene E. Bloch
    <> writes:
    >On 3/08/2012, Joerg Jaeger posted:
    >> On 3/8/2012 5:37 PM, Stan Brown wrote:
    >>> On Thu, 08 Mar 2012 06:57:30 -0600, danielfird wrote:
    >>>> 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.
    >>>
    >>> Really not necessary, though I'm glad it worked for you.
    >>>
    >>> Find the folder in question in Explorer, Shift-Right-click and select
    >>> Open Command Prompt here. Type "dir /x" (no quotes) to reveal the
    >>> short file names next to the long file names. Then "del" (no quotes)
    >>> and the short file name.
    >>>

    >
    >> That seems to work well. I think you can most likely solve most
    >>problems with the shell.
    >> Just like in Linux.
    >> From what i tried it looks like Windows names the first 6 letters,
    >>then a ~ and a counting number with extension.


    Variations in that appear when you get past the counting number of 9, or
    the first few characters include some not allowed in an 8.3 name (fewer
    characters are allowed than in long names - spaces for example), or if
    the extension has more than three characters, or ...
    >
    >Yes, that's correct or close to correct, AFAIK. Still, the safest thing
    >is to use dir /x in a command window, so as not to accidentally use the
    >wrong name. Dir /x shows both names, which makes correct identification
    >easy.
    >

    Agreed.
    --
    J. P. Gilliver. UMRA: 1960/<1985 MB++G.5AL-IS-P--Ch++(p)Ar@T0H+Sh0!:`)DNAf

    Abandon hope, all ye who <ENTER> here.
     
    J. P. Gilliver (John), Mar 9, 2012
    #21
    1. Advertisements

  2. On 3/09/2012, J. P. Gilliver (John) posted:
    > In message <yac6r.13400$>, Bob I <>
    > writes:
    >>Another method is to map a drive letter to a folder just above the problem
    >> file. To do this share the folder to everyone and then map the folder as a
    >> network share. Disconnect the drive when done and remove sharing
    >> permission. Saves a lot of messing about with renaming

    > []
    > Does SUBST no longer work in 7? (It works in XP; I think XP tries to dissuade
    > you from using it, but I haven't experienced any ill-effects, provided you
    > know you're using it.)


    > Mapping drive letters - and SUBST if available - are (possible) solutions to
    > the problem of too long a name including the path; if the path is not
    > involved, then use of the short name is better.


    On this Windows 7 computer, subst /? in a command window gives a brief
    help message. I would guess that means it works in Win 7.

    Subst /help gives an error message :)

    --
    Gene E. Bloch (Stumbling Bloch)
     
    Gene E. Bloch, Mar 9, 2012
    #22
    1. Advertisements

  3. In article <>,
    d says...
    >
    > On 3/09/2012, J. P. Gilliver (John) posted:
    > > In message <yac6r.13400$>, Bob I <>
    > > writes:
    > >>Another method is to map a drive letter to a folder just above the problem
    > >> file. To do this share the folder to everyone and then map the folder as a
    > >> network share. Disconnect the drive when done and remove sharing
    > >> permission. Saves a lot of messing about with renaming

    > > []
    > > Does SUBST no longer work in 7? (It works in XP; I think XP tries to dissuade
    > > you from using it, but I haven't experienced any ill-effects, provided you
    > > know you're using it.)

    >
    > > Mapping drive letters - and SUBST if available - are (possible) solutions to
    > > the problem of too long a name including the path; if the path is not
    > > involved, then use of the short name is better.

    >
    > On this Windows 7 computer, subst /? in a command window gives a brief
    > help message. I would guess that means it works in Win 7.
    >
    > Subst /help gives an error message :)


    (-;

    --
    Zaphod

    Adventurer, ex-hippie, good-timer (crook? quite possibly),
    manic self-publicist, terrible bad at personal relationships,
    often thought to be completely out to lunch.
     
    Zaphod Beeblebrox, Mar 9, 2012
    #23
  4. Alf

    Zaidy036 Guest

    On 3/9/2012 3:44 PM, Zaphod Beeblebrox wrote:
    > In article<>,
    > d says...
    >>
    >> On 3/09/2012, J. P. Gilliver (John) posted:
    >>> In message<yac6r.13400$>, Bob I<>
    >>> writes:
    >>>> Another method is to map a drive letter to a folder just above the problem
    >>>> file. To do this share the folder to everyone and then map the folder as a
    >>>> network share. Disconnect the drive when done and remove sharing
    >>>> permission. Saves a lot of messing about with renaming
    >>> []
    >>> Does SUBST no longer work in 7? (It works in XP; I think XP tries to dissuade
    >>> you from using it, but I haven't experienced any ill-effects, provided you
    >>> know you're using it.)

    >>
    >>> Mapping drive letters - and SUBST if available - are (possible) solutions to
    >>> the problem of too long a name including the path; if the path is not
    >>> involved, then use of the short name is better.

    >>
    >> On this Windows 7 computer, subst /? in a command window gives a brief
    >> help message. I would guess that means it works in Win 7.
    >>
    >> Subst /help gives an error message :)

    >
    > (-;
    >

    subst /? works but /help gives an error on my Win7 64bit

    --
    Zaidy036
     
    Zaidy036, Mar 9, 2012
    #24
  5. On 3/09/2012, Zaidy036 posted:
    > On 3/9/2012 3:44 PM, Zaphod Beeblebrox wrote:
    >> In article<>,
    >> d says...
    >>>
    >>> On 3/09/2012, J. P. Gilliver (John) posted:
    >>>> In message<yac6r.13400$>, Bob I<>
    >>>> writes:
    >>>>> Another method is to map a drive letter to a folder just above the
    >>>>> problem
    >>>>> file. To do this share the folder to everyone and then map the folder as
    >>>>> a
    >>>>> network share. Disconnect the drive when done and remove sharing
    >>>>> permission. Saves a lot of messing about with renaming
    >>>> []
    >>>> Does SUBST no longer work in 7? (It works in XP; I think XP tries to
    >>>> dissuade
    >>>> you from using it, but I haven't experienced any ill-effects, provided
    >>>> you
    >>>> know you're using it.)
    >>>
    >>>> Mapping drive letters - and SUBST if available - are (possible) solutions
    >>>> to
    >>>> the problem of too long a name including the path; if the path is not
    >>>> involved, then use of the short name is better.
    >>>
    >>> On this Windows 7 computer, subst /? in a command window gives a brief
    >>> help message. I would guess that means it works in Win 7.
    >>>
    >>> Subst /help gives an error message :)

    >>
    >> (-;
    >>

    > subst /? works but /help gives an error on my Win7 64bit


    That's no surprise to me, since that's what I just reported two posts
    up...

    In this post, that's 4 and 6 lines above your comment.

    --
    Gene E. Bloch (Stumbling Bloch)
     
    Gene E. Bloch, Mar 10, 2012
    #25
  6. In message <jje43l$914$>, Zaidy036 <>
    writes:
    >On 3/9/2012 3:44 PM, Zaphod Beeblebrox wrote:
    >> In article<>,
    >> d says...
    >>>
    >>> On 3/09/2012, J. P. Gilliver (John) posted:
    >>>> In message<yac6r.13400$>, Bob I<>
    >>>> writes:
    >>>>> Another method is to map a drive letter to a folder just above the problem
    >>>>> file. To do this share the folder to everyone and then map the folder as a
    >>>>> network share. Disconnect the drive when done and remove sharing
    >>>>> permission. Saves a lot of messing about with renaming
    >>>> []
    >>>> Does SUBST no longer work in 7? (It works in XP; I think XP tries
    >>>>to dissuade
    >>>> you from using it, but I haven't experienced any ill-effects, provided you
    >>>> know you're using it.)
    >>>
    >>>> Mapping drive letters - and SUBST if available - are (possible)
    >>>>solutions to
    >>>> the problem of too long a name including the path; if the path is not
    >>>> involved, then use of the short name is better.
    >>>
    >>> On this Windows 7 computer, subst /? in a command window gives a brief
    >>> help message. I would guess that means it works in Win 7.
    >>>
    >>> Subst /help gives an error message :)

    >>
    >> (-;
    >>

    >subst /? works but /help gives an error on my Win7 64bit
    >

    Before we get too far down this road: I mentioned subst because I find
    it a lot easier to use, when just working within existing drives, than
    using the mapping network drive method.
    --
    J. P. Gilliver. UMRA: 1960/<1985 MB++G.5AL-IS-P--Ch++(p)Ar@T0H+Sh0!:`)DNAf

    People wear anoraks because it's cold outside and it rains, not to annoy the
    editors of style magazines. - Ben Elton, Radio Times 18-24 April 1998
     
    J. P. Gilliver (John), Mar 10, 2012
    #26
  7. Alf

    atillarist Guest

    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
    >

    After days of searching I finally found solution for unlocking, managing an
    renaming long named files. Get your problem solved fro
    http://longpathtool.com/
     
    atillarist, Mar 29, 2012
    #27
  8. On 3/29/2012, atillarist posted:
    > 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
    >>

    > After days of searching I finally found solution for unlocking, managing and
    > renaming long named files. Get your problem solved from
    > http://something.something/


    It looks to me like an old spammer is back with a new nym.

    Any other opinions?

    --
    Gene E. Bloch (Stumbling Bloch)
     
    Gene E. Bloch, Mar 30, 2012
    #28
  9. Alf

    Char Jackson Guest

    On Thu, 29 Mar 2012 16:08:56 -0700, Gene E. Bloch
    <> wrote:

    >On 3/29/2012, atillarist posted:
    >> 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
    >>>

    >> After days of searching I finally found solution for unlocking, managing and
    >> renaming long named files. Get your problem solved from
    >> http://something.something/

    >
    >It looks to me like an old spammer is back with a new nym.
    >
    >Any other opinions?


    I randomly see 'helpful' posts like the one above, all pointing to the
    same utility, in most of my subscribed text groups. Like the one
    above, they are usually replies to posts that are 1-4 years old.

    --

    Char Jackson
     
    Char Jackson, Mar 30, 2012
    #29
  10. Alf

    Tony Luxton Guest

    On 30/03/2012 2:28 am, Char Jackson wrote:
    > On Thu, 29 Mar 2012 16:08:56 -0700, Gene E. Bloch
    > <> wrote:
    >
    >> On 3/29/2012, atillarist posted:
    >>> 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
    >>>>
    >>> After days of searching I finally found solution for unlocking, managing and
    >>> renaming long named files. Get your problem solved from
    >>> http://something.something/

    >> It looks to me like an old spammer is back with a new nym.
    >>
    >> Any other opinions?

    > I randomly see 'helpful' posts like the one above, all pointing to the
    > same utility, in most of my subscribed text groups. Like the one
    > above, they are usually replies to posts that are 1-4 years old.
    >

    So what? People might still want the information, even if it's been
    answered before in a post that's long been deleted from the server.
     
    Tony Luxton, Apr 7, 2012
    #30
  11. Alf

    Char Jackson Guest

    On Sat, 07 Apr 2012 12:20:45 +0100, Tony Luxton
    <> wrote:

    >On 30/03/2012 2:28 am, Char Jackson wrote:
    >> On Thu, 29 Mar 2012 16:08:56 -0700, Gene E. Bloch
    >> <> wrote:
    >>
    >>> On 3/29/2012, atillarist posted:
    >>>> 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
    >>>>>
    >>>> After days of searching I finally found solution for unlocking, managing and
    >>>> renaming long named files. Get your problem solved from
    >>>> http://something.something/
    >>> It looks to me like an old spammer is back with a new nym.
    >>>
    >>> Any other opinions?

    >> I randomly see 'helpful' posts like the one above, all pointing to the
    >> same utility, in most of my subscribed text groups. Like the one
    >> above, they are usually replies to posts that are 1-4 years old.
    >>

    >So what? People might still want the information, even if it's been
    >answered before in a post that's long been deleted from the server.


    Replying to 4 year old posts, and basically spamming at the same time,
    isn't really helpful.

    --

    Char Jackson
     
    Char Jackson, Apr 7, 2012
    #31
  12. Alf

    Bravesoul

    Joined:
    May 16, 2012
    Messages:
    1
    Likes Received:
    0
    Solution For Excessively Long File Names in Windows 7

    Ok after I had a problem deleting several files that have excessively long file names, I came to this forum and searched for a solution.
    Some sounded a little to complicated to attempt.
    Then it dawned on me like a light switch went off in my head.
    I have wifi setup on my laptop, and from time to time send files and receive files from my phone.
    I use an application called ES File Explorer which is a free application on the Android Market.
    So I decided to delete the files using ES File Explorer.
    Steps I took to delete file.
    1. Shared out the drive with the problem in my case it was drive: K
    ---> note: I don't suggest you share your computer on a public network that would open your computer to risks. <----
    2. Using ES File Explorer select Lan (search for computers on private wifi)
    3. Logged into my computer through ES File Explorer (on my private wifi network)
    3. Navigated to the file with the problem and told ES File Explorer to delete it.

    Since my phone's operating system is based on linux I was able to delete it with no problem.
    This solution should also work for extremely long directory names.

    Hope this helps :)
     
    Last edited: May 16, 2012
    Bravesoul, May 16, 2012
    #32
  13. Alf

    Retseem

    Joined:
    May 16, 2012
    Messages:
    1
    Likes Received:
    0
    I just used the file explorer from 7-zip.
    This explorer doesn't seem to care about file name lenght, path lenght\depth or whatsoever.
     
    Retseem, May 16, 2012
    #33
  14. Alf

    lyf4ce

    Joined:
    Jun 13, 2012
    Messages:
    1
    Likes Received:
    0
    CMD Prompt Solution

    I just had this problem and used this in order to delete the files:

    for /f "tokens=5* delims= " %g IN ('dir /x') DO (del "%g% /f /q /s)

    Didn't delete directories, but deleted all files in them and then the directories could be deleted.
     
    lyf4ce, Jun 13, 2012
    #34
  15. Alf

    wagu

    Joined:
    Jul 3, 2012
    Messages:
    1
    Likes Received:
    0
    this worked for me, without a 3rd party tool

    When I tried to delete it directly using the shortname, I still got the name is too long error. But when I renamed it first using the shortname, I was able to delete it using the new name.

    STEPS:
    1. dir E* /x (to find the short name of my long file name that started with letter "E")
    2. ren EVIL001~1 deleteMe (renamed it to "deleteMe" using the short name)
    3. del deleteMe (bye-bye evil long name file!!)
     
    wagu, Jul 3, 2012
    #35
  16. Alf

    Kellynim

    Joined:
    Oct 8, 2012
    Messages:
    2
    Likes Received:
    0
    how to delete long path file

    There are several reasons why Windows might not allow you to delete a file:

    • The file might be in use in which case you can't delete the file until the program using it gives it up.
    • The file might be marked read-only.
    • The file name might be so long that Windows can't handle it. File names with more than 260 characters in them are often difficult to delete.
    There are also several reasons why Windows might not allow you to change the name of a file; particularly its extension. All above apply here; as well as...

    • Your system may not be showing file extensions by default.
    We'll cover that one first and the others in turn.
     
    Kellynim, Oct 8, 2012
    #36
  17. Alf

    mramsden

    Joined:
    Oct 27, 2012
    Messages:
    1
    Likes Received:
    0
    Simple solution .... works for same prob in Windows 8

    It's not just the filename length .. it's also the path length.

    I just created a folder in the root directory, moved the folder containing the offending files with the very long names into that single level deep folder, and deleted it there.

    The shorter path length did the trick.
     
    mramsden, Oct 27, 2012
    #37
  18. Alf

    daveq

    Joined:
    Nov 23, 2012
    Messages:
    1
    Likes Received:
    0
    Thanks for the help. Been years I've had such files!

    Thanks for the help. Been years I've had such files!
     
    daveq, Nov 23, 2012
    #38
  19. Alf

    alexiusnor

    Joined:
    Jun 6, 2013
    Messages:
    1
    Likes Received:
    0
    Alf bro have you ever used Long Path Tool, if not then i will suggest you to download this and use it..You will get solution of your problem shared here.
     
    alexiusnor, Jun 6, 2013
    #39
  20. Alf

    bmiranda

    Joined:
    Oct 26, 2013
    Messages:
    1
    Likes Received:
    0
    Had a similar problem before. I just used the Long Path Tool and it worked. The software can be downloaded for free. Very helpful!
     
    bmiranda, Oct 26, 2013
    #40
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VR4Jen

    File names with a period aren't saving correctly

    VR4Jen, Mar 5, 2010, in forum: Windows 7 Support
    Replies:
    8
    Views:
    3,069
    lavor
    Nov 7, 2012
  2. Darth Raider

    File Names In Windows Explorer

    Darth Raider, Oct 21, 2010, in forum: alt.windows7.general
    Replies:
    11
    Views:
    2,865
    Andrew Rossmann
    Oct 29, 2010
  3. ErrorMagnet

    Printer printing very very light

    ErrorMagnet, Jun 28, 2011, in forum: Off-Topic Discussion
    Replies:
    0
    Views:
    1,982
    ErrorMagnet
    Jun 28, 2011
  4. Peter Jason

    Windows 7 long file names and databases.

    Peter Jason, Sep 14, 2011, in forum: alt.windows7.general
    Replies:
    19
    Views:
    1,537
    Bob I
    Sep 16, 2011
  5. zambas

    SOLVED bsods almost every day for a long long time

    zambas, Jun 26, 2014, in forum: Crashes, BSODs and Debugging
    Replies:
    91
    Views:
    5,104
    zambas
    Aug 5, 2014
Loading...