What's new

Solved Unable to delete a folder due to long path,

Status
Not open for further replies.

jamal numan

New Member
Unable to delete a folder due to long path,

I wanted to delete the attached file but I got the “long path” error (attached).


How the folder can be deleted anyway?


Thank you

Best

Jamal
 

Attachments

  • Clip_430.jpg
    Clip_430.jpg
    158.8 KB · Views: 25
  • Clip_431.jpg
    Clip_431.jpg
    174.2 KB · Views: 28

My Computer

System One

  • OS
    windows 7
    Computer type
    Laptop
    System Manufacturer/Model
    sony
    CPU
    2.4

Mooly

Member
Pro User
One of those things you perhaps need to be sat in front of to play with...

Have you tried dragging the folder elsewhere, say to documents and deleting from there ?

Is it in a separate HDD ? if so have you tried using the HDD on another PC and deleting from there.

And totally crazy suggestion... browse for the folder by using the "insert image" option on this forum (as if you were attaching a picture). When the forum window opens and you have the folder showing can you right click and delete it from there.
 

My Computer

System One

  • OS
    W10 x64 pro and W8.1 x86
    Computer type
    Laptop
    System Manufacturer/Model
    Dell Vostro 3750/Acer 9301
    CPU
    Intel i5/AMD Turion 64
    Memory
    4Gb/2Gb
    Graphics Card(s)
    Intel i5 internal/NVidia GEFORCE GO 6100
    Sound Card
    Realtek
    Hard Drives
    250Gb SSD and 120Gb
    Mouse
    HP Z4000
    Internet Speed
    76 down, 20 up
    Browser
    MS Edge
    Antivirus
    Defender

MilesAhead

Eclectician
VIP Member
Pro User
Shift right click on the folder. Then click Open Command Window Here. Enter these commands once you have the prompt opened to that folder:

del *.* /s
cd ..
rd foldername

where foldername is the name of the folder. If it contains any spaces wrap the name in double quotes like
rd "folder name"
 

My Computer

System One

  • OS
    Windows 8.0 x64
    Computer type
    Laptop
    System Manufacturer/Model
    Toshiba Satelite C55D-A Laptop
    CPU
    AMD EI 1200
    Memory
    4 gb DDR3
    Graphics Card(s)
    Raedon 340 MB dedicated Ram
    Monitor(s) Displays
    Built in
    Screen Resolution
    1366 x 768
    Hard Drives
    640 GB (spinner) Sata II
    Keyboard
    Built in
    Mouse
    Touch pad

TairikuOkami

Be nice to all, please?!
Pro User
The simplest way is to use UNLOCKER .
 

My Computer

System One

  • OS
    Win 8.1.1 Pro x64
    Computer type
    Laptop
    System Manufacturer/Model
    Lenovo E525
    CPU
    AMD A4-3300M @ 2,0GHz
    Memory
    6GB DDR3 1333MHz
    Graphics Card(s)
    AMD Radeon HD 6480G 512MB shared
    Sound Card
    Creative Sound Blaster X-Fi Surround 5.1
    Screen Resolution
    1366x768
    Hard Drives
    WD 465GB
    Cooling
    Fusion Tweaker
    Keyboard
    Logitech K360
    Mouse
    Logitech M705
    Internet Speed
    50/50 MBps
    Browser
    Yandex
    Antivirus
    No AV & No Firewall
    Other Info
    Headphones: Sennheiser RS170

jamal numan

New Member
Shift right click on the folder. Then click Open Command Window Here. Enter these commands once you have the prompt opened to that folder:

del *.* /s
cd ..
rd foldername

where foldername is the name of the folder. If it contains any spaces wrap the name in double quotes like
rd "folder name"

Thanks guys for the help,

It appears not to work. It still says: “too long”

I think that the issue is with the file stored in the location below (shown in the screenshot):

F:\All\Software\GeoMedia\GeoMedia Desktop 14.1\GeoMedia Desktop 14.1\GeoMedia Desktop 14.1\Repository\GeoMedia\GeoMedia Grid Tutorials\Customer-Based Tutorials\A Natural Heritage Study\Custom Commands\MatrixScoreCalculator\src

I tried to add a file is the same folder and delete it and it worked fine.

What other options do I still have to delete this folder (which is in an external HD)?
 

Attachments

  • Clip_432.jpg
    Clip_432.jpg
    488.6 KB · Views: 25
  • Clip_433.jpg
    Clip_433.jpg
    134.5 KB · Views: 16
  • Clip_434.jpg
    Clip_434.jpg
    117.5 KB · Views: 18
  • Clip_435.jpg
    Clip_435.jpg
    178.7 KB · Views: 19
  • Clip_436.jpg
    Clip_436.jpg
    154.3 KB · Views: 16

My Computer

System One

  • OS
    windows 7
    Computer type
    Laptop
    System Manufacturer/Model
    sony
    CPU
    2.4

topgundcp

Well-Known Member
VIP Member
Guru

My Computer

System One

  • OS
    8.1x64PWMC Ubuntu14.04x64 MintMate17x64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Home Brewed
    CPU
    I7 4970K OC'ed @4.7 GHz
    Motherboard
    MSI-Z97
    Memory
    16 GB G-Skill Trident X @2400MHZ
    Graphics Card(s)
    NVIDIA GeForce GTS 450
    Sound Card
    X-Fi Titanium Fatal1ty Professional Series
    Monitor(s) Displays
    Dual HP-W2408
    Screen Resolution
    1920X1200
    Hard Drives
    256 GB M2 sm951, (2) 500GB 850EVO, 5TB, 2 TB Seagate
    PSU
    Antec 850W
    Case
    Antec 1200
    Cooling
    Danger Den H20
    Keyboard
    Logitech
    Mouse
    Logitech Performance Mouse MX
    Internet Speed
    35/12mbps
    Browser
    Firefox

jamal numan

New Member
You can try using:TreeSize Free Portable
Explore the folders and right click to delete it.

Many thanks topgundcp for the help,

Same issue! Not able to delete the file! “too long” (attached)

What other tools that can delete this annoying folder?
 

Attachments

  • Clip_437.jpg
    Clip_437.jpg
    215.9 KB · Views: 13
  • Clip_438.jpg
    Clip_438.jpg
    219.2 KB · Views: 13

My Computer

System One

  • OS
    windows 7
    Computer type
    Laptop
    System Manufacturer/Model
    sony
    CPU
    2.4

Mooly

Member
Pro User
The time you are spending on this... would it be quicker to move the stuff you want to another drive, format this one and then move the stuff back.
 

My Computer

System One

  • OS
    W10 x64 pro and W8.1 x86
    Computer type
    Laptop
    System Manufacturer/Model
    Dell Vostro 3750/Acer 9301
    CPU
    Intel i5/AMD Turion 64
    Memory
    4Gb/2Gb
    Graphics Card(s)
    Intel i5 internal/NVidia GEFORCE GO 6100
    Sound Card
    Realtek
    Hard Drives
    250Gb SSD and 120Gb
    Mouse
    HP Z4000
    Internet Speed
    76 down, 20 up
    Browser
    MS Edge
    Antivirus
    Defender

jamal numan

New Member
The time you are spending on this... would it be quicker to move the stuff you want to another drive, format this one and then move the stuff back.

Do you mean that I need to format a HD of about 900GB to fix the issue of that folder?
 

Attachments

  • Clip_439.jpg
    Clip_439.jpg
    219.8 KB · Views: 18

My Computer

System One

  • OS
    windows 7
    Computer type
    Laptop
    System Manufacturer/Model
    sony
    CPU
    2.4

topgundcp

Well-Known Member
VIP Member
Guru
It would be interesting if we can try with linux.
If you wish to try:

  1. Download the ISO (160MB) :Slacko Puppy Linux . Click one of the link shown on screen shot #1.
  2. Create a bootable USB Using Rufus - Create bootable USB drives the easy way
  3. Boot from USB, the screen should look like the screen shot. From the bottom left #2 of the screen. The HDs mounted as sda1, sda2 ... and one of these is your external drive.
  4. Explore the folder(s) and delete it.

slacko.png
 

My Computer

System One

  • OS
    8.1x64PWMC Ubuntu14.04x64 MintMate17x64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Home Brewed
    CPU
    I7 4970K OC'ed @4.7 GHz
    Motherboard
    MSI-Z97
    Memory
    16 GB G-Skill Trident X @2400MHZ
    Graphics Card(s)
    NVIDIA GeForce GTS 450
    Sound Card
    X-Fi Titanium Fatal1ty Professional Series
    Monitor(s) Displays
    Dual HP-W2408
    Screen Resolution
    1920X1200
    Hard Drives
    256 GB M2 sm951, (2) 500GB 850EVO, 5TB, 2 TB Seagate
    PSU
    Antec 850W
    Case
    Antec 1200
    Cooling
    Danger Den H20
    Keyboard
    Logitech
    Mouse
    Logitech Performance Mouse MX
    Internet Speed
    35/12mbps
    Browser
    Firefox

Edwin

Well-Known Member
VIP Member
Guru
Just a thought guys...
Couldn't you rename the folder to something less than 260 characters then delete it?
I'm sure I've done that in the past.
Maybe it won't work? I don't know!
Just spit-balling here! ;)
 

My Computers

System One System Two

  • OS
    Windows 7 Home Premium
    Computer type
    PC/Desktop
    System Manufacturer/Model
    HP Pavillion

Mooly

Member
Pro User
Do you mean that I need to format a HD of about 900GB to fix the issue of that folder?

Well you've been 4 hours just on here over this :) and it is a guaranteed fix.

(as I mentioned earlier, its the kind of thing you need to be sat in front of to see what is happening. Formatting isn't a particularly elegant solution but if it comes down to it.....)
 

My Computer

System One

  • OS
    W10 x64 pro and W8.1 x86
    Computer type
    Laptop
    System Manufacturer/Model
    Dell Vostro 3750/Acer 9301
    CPU
    Intel i5/AMD Turion 64
    Memory
    4Gb/2Gb
    Graphics Card(s)
    Intel i5 internal/NVidia GEFORCE GO 6100
    Sound Card
    Realtek
    Hard Drives
    250Gb SSD and 120Gb
    Mouse
    HP Z4000
    Internet Speed
    76 down, 20 up
    Browser
    MS Edge
    Antivirus
    Defender

MilesAhead

Eclectician
VIP Member
Pro User
Try del *.* /s /q

the /q should get rid of the "are you sure" crap. :)

edit: also don't have the folder open in Explorer while trying to remove it on the command line. You'll probably get a "folder is in use..." error.
 

My Computer

System One

  • OS
    Windows 8.0 x64
    Computer type
    Laptop
    System Manufacturer/Model
    Toshiba Satelite C55D-A Laptop
    CPU
    AMD EI 1200
    Memory
    4 gb DDR3
    Graphics Card(s)
    Raedon 340 MB dedicated Ram
    Monitor(s) Displays
    Built in
    Screen Resolution
    1366 x 768
    Hard Drives
    640 GB (spinner) Sata II
    Keyboard
    Built in
    Mouse
    Touch pad

MilesAhead

Eclectician
VIP Member
Pro User
A bit of overkill. Explorer has a 260 char path limit. Obviously files and folders with longer paths can be created and deleted programmatically. Just not through Explorer. However if the OP is going to use Explorer as the main file manager it's a good idea to prevent paths longer than 260 chars. If some "must use" 3rd party software insists on creating long paths then my suggestion is switch to a file manager that can handle it.


It would be interesting if we can try with linux.
If you wish to try:

  1. Download the ISO (160MB) :Slacko Puppy Linux . Click one of the link shown on screen shot #1.
  2. Create a bootable USB Using Rufus - Create bootable USB drives the easy way
  3. Boot from USB, the screen should look like the screen shot. From the bottom left #2 of the screen. The HDs mounted as sda1, sda2 ... and one of these is your external drive.
  4. Explore the folder(s) and delete it.

View attachment 50394
 

My Computer

System One

  • OS
    Windows 8.0 x64
    Computer type
    Laptop
    System Manufacturer/Model
    Toshiba Satelite C55D-A Laptop
    CPU
    AMD EI 1200
    Memory
    4 gb DDR3
    Graphics Card(s)
    Raedon 340 MB dedicated Ram
    Monitor(s) Displays
    Built in
    Screen Resolution
    1366 x 768
    Hard Drives
    640 GB (spinner) Sata II
    Keyboard
    Built in
    Mouse
    Touch pad

MilesAhead

Eclectician
VIP Member
Pro User
In fact the best idea, get a file manager that can handle paths > 260. You're going to need it anyway.
 

My Computer

System One

  • OS
    Windows 8.0 x64
    Computer type
    Laptop
    System Manufacturer/Model
    Toshiba Satelite C55D-A Laptop
    CPU
    AMD EI 1200
    Memory
    4 gb DDR3
    Graphics Card(s)
    Raedon 340 MB dedicated Ram
    Monitor(s) Displays
    Built in
    Screen Resolution
    1366 x 768
    Hard Drives
    640 GB (spinner) Sata II
    Keyboard
    Built in
    Mouse
    Touch pad

Mooly

Member
Pro User
Pleased to hear you found a solution (or at least a workround) to the problem.
 

My Computer

System One

  • OS
    W10 x64 pro and W8.1 x86
    Computer type
    Laptop
    System Manufacturer/Model
    Dell Vostro 3750/Acer 9301
    CPU
    Intel i5/AMD Turion 64
    Memory
    4Gb/2Gb
    Graphics Card(s)
    Intel i5 internal/NVidia GEFORCE GO 6100
    Sound Card
    Realtek
    Hard Drives
    250Gb SSD and 120Gb
    Mouse
    HP Z4000
    Internet Speed
    76 down, 20 up
    Browser
    MS Edge
    Antivirus
    Defender

jamal numan

New Member
Try del *.* /s /q

the /q should get rid of the "are you sure" crap. :)

edit: also don't have the folder open in Explorer while trying to remove it on the command line. You'll probably get a "folder is in use..." error.

Hi MilesAhead,

I have tried it but got the same error “too long”
 

Attachments

  • Clip_462.jpg
    Clip_462.jpg
    113.6 KB · Views: 15

My Computer

System One

  • OS
    windows 7
    Computer type
    Laptop
    System Manufacturer/Model
    sony
    CPU
    2.4
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top