topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 12, 2024, 4:59 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: How to delete a folder that Windows can't find?  (Read 6242 times)

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
How to delete a folder that Windows can't find?
« on: October 06, 2020, 05:35 AM »
Somehow my Windows 10 ended up with a folder on C: that it "can't find" when I try to delete it. :o

IIRC I copied or FTP downloaded a folder with a very long name (let's call it "Z"), containing files with long file names. Now I can only rename the folders above Z, but not Z itself. I can't open Z either. Deleting Z or any parent folder fails.

Any ideas? :)

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,649
    • View Profile
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #1 on: October 06, 2020, 05:53 AM »
Stuff I've done in the past:
Shorten names from above until it comes into range.
Map a drive letter to something just above the problem folder to "shorten" its path when accessed through the mapped letter.

and if you just want to delete it:
RmDir \\.\C:\[parent folder path] /q /s

Had to use that one a few times to get rid of hacked FTP's with hidden folder trees, using space character named folders.

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #2 on: October 06, 2020, 05:58 AM »
For a GUI, try Helge Klein SetACL Studio. It will delete anything. Product page here, no cost (used to be commercial).
vi vi vi - editor of the beast

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #3 on: October 06, 2020, 06:09 AM »
Yeah, I had already unsuccessfully tried "Shorten names from above until it comes into range."

rmdir did the trick! More info: https://docs.microso...ndows-commands/rmdir

Thanks to both of you!  :)

hpearce

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 139
    • View Profile
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #4 on: October 06, 2020, 09:13 AM »
Make sure you verify it's existence and name in the detail panel as opposed to the tree
Windows 7 SP1 (TM) Home Premium 64-bit .. Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26 GHz / 2.27 GHz .. 4GB RAM .. NVIDIA GeForce 9800M GTS .. Gateway P-7805u FX

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #5 on: October 06, 2020, 10:45 AM »
Make sure you verify it's existence and name in the detail panel as opposed to the tree
Does it happen that there's a difference between the two? I checked and it's really gone. :)

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,777
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #6 on: October 06, 2020, 09:58 PM »
I know the issue is already resolved, but here's another potential suggestion for anyone else who may come across this thread in the future. When problems like this crop up on my PC, I just boot into a Linux Live USB (usually Linux Mint) and delete the files from there. :Thmbsup:

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #7 on: October 06, 2020, 10:27 PM »
In these situations, and especially with the "filename too long" problems, another thing I always try is to use the 7-Zip GUI interface to see if I can get to the folder and delete it from within 7-Zip.  Sounds strange, but it works quite often.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #8 on: October 07, 2020, 12:13 AM »
"How to delete a folder that Windows can't find?" -- sounds like a zen koan

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #9 on: October 07, 2020, 05:30 AM »
I know the issue is already resolved, but here's another potential suggestion for anyone else who may come across this thread in the future. When problems like this crop up on my PC, I just boot into a Linux Live USB (usually Linux Mint) and delete the files from there. :Thmbsup:
That would take (me) more time though. 8) And is Linux able to handle NTFS?


In these situations, and especially with the "filename too long" problems, another thing I always try is to use the 7-Zip GUI interface to see if I can get to the folder and delete it from within 7-Zip.  Sounds strange, but it works quite often.
Wow, that's weird! But cool. :)


"How to delete a folder that Windows can't find?" -- sounds like a zen koan
Yeah, it's a special sentence for sure.  ;D

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,649
    • View Profile
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #10 on: October 07, 2020, 06:00 AM »
"How to delete a folder that Windows can't find?" -- sounds like a zen koan

It was for a lot of FTP admins back in the day. Pirates would search for an un or poorly secured FTP server, and the create a folder tree with a space as one of the folder names using a Linux client (which allowed it..). Warez shoppers could easily traverse the path from outside, but the FTP admin could not see the hidden - space named - folder on their server using the Windows Explorer shell … Until the used space on the drive started to draw attention to something being very (very...) wrong.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,777
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #11 on: October 07, 2020, 10:05 AM »
I know the issue is already resolved, but here's another potential suggestion for anyone else who may come across this thread in the future. When problems like this crop up on my PC, I just boot into a Linux Live USB (usually Linux Mint) and delete the files from there. :Thmbsup:
That would take (me) more time though. 8) And is Linux able to handle NTFS?

I just always have a thumb drive with Linux on it hanging around just in case my Windows install dies and I need to boot into an OS that will allow me to attempt repairs or at least back up files before wiping the OS drive to reinstall. So it's not much time for me at all.

And yes, Linux can handle NTFS.
« Last Edit: October 07, 2020, 03:48 PM by Deozaan »

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #12 on: October 07, 2020, 02:41 PM »
Ah, good to know. :)

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #13 on: November 09, 2020, 01:35 PM »
For a GUI, try Helge Klein SetACL Studio. It will delete anything. Product page here, no cost (used to be commercial).
I found two more folders that couldn't be deleted, but this time on external drives, not C: - this time, rmdir failed twice, but SetACL Studio got the job done. NICE! :)

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #14 on: November 09, 2020, 03:57 PM »
For a GUI, try Helge Klein SetACL Studio. It will delete anything. Product page here, no cost (used to be commercial).

Last year I had one folder it couldn't delete, couldn't do anything with it.
Can't remember what happened in the end, think I gave up and reinstalled Windows or formatted the drive.
Most obstinate file/folder I've had in 40+ years of playing with computers 🤣

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #15 on: November 10, 2020, 06:19 AM »
For a GUI, try Helge Klein SetACL Studio. It will delete anything. Product page here, no cost (used to be commercial).

Last year I had one folder it couldn't delete, couldn't do anything with it.
Can't remember what happened in the end, think I gave up and reinstalled Windows or formatted the drive.
Most obstinate file/folder I've had in 40+ years of playing with computers 🤣
Yeah... I also remember applying the just give up 'solution' in the past. I just ignored it, deep in its directory path. :D

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,649
    • View Profile
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #16 on: November 11, 2020, 08:52 AM »
For the non long path related shenanigans, the other two most likely gotchas are ownership and attributes. I just ran into the - blast-from-the-past - attribute thing a week or so ago. Had a file marked read only and system that wouldn't leave until I stripped off those attributes.

LarenVansort

  • Participant
  • Joined in 2020
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: How to delete a folder that Windows can't find?
« Reply #17 on: November 17, 2020, 02:09 PM »
Stuff I've done in the past:
Shorten names from above until it comes into range.
Map a drive letter to something just above the problem folder to "shorten" its path when accessed through the mapped letter.

and if you just want to delete it:
RmDir \\.\C:\[parent folder path] /q /s

Had to use that one a few times to get rid of hacked FTP's with hidden folder trees, using space character named folders.

Thank you very much for your help, I was looking for an answer for a week!