Deleting folders - it won't let me?


  1. Posts : 100
    Windows 10
       #1

    Deleting folders - it won't let me?


    Hi,

    I have a very odd problem! Trying to delete some folders, I get a 0x80004005 error. I have looked it up on Google, and it says its a generic error - but normally around permissions. One of the files in question is:

    F:\George-URBackup-Files\foo.com\220304-0930\home\peekio\web\foo.com\public_html\Business\Business_Services\Communications\Public_Speaking\M otivation\North_America\United_States\Washington_D.C.

    Another is:

    F:\George-URBackup-Files\pagething.com\220304-0930\home\peekio\web\peekio.com\public_html\Business\Business_Services\Communications\Public_Speakin g\Speakers_Bureaus\North_America\United_States\Washington_D.C.

    If I try to delete that folder I get:

    Deleting folders - it won't let me?-error2.png

    If I try and click it to open I get:

    Deleting folders - it won't let me?-untitled.png

    I've tried running chkdsk , which seems ok:

    PS F:\> chkdsk /f
    The type of the file system is NTFS.
    Cannot lock current drive.

    Chkdsk cannot run because the volume is in use by another
    process. Chkdsk may run if this volume is dismounted first.
    ALL OPENED HANDLES TO THIS VOLUME WOULD THEN BE INVALID.
    Would you like to force a dismount on this volume? (Y/N) y
    Volume dismounted. All opened handles to this volume are now invalid.
    Volume label is My Passport.

    Stage 1: Examining basic file system structure ...
    9975296 file records processed.
    File verification completed.
    Phase duration (File record verification): 1.50 hours.
    30804 large file records processed.
    Phase duration (Orphan file record recovery): 0.00 milliseconds.
    0 bad file records processed.
    Phase duration (Bad file record checking): 0.23 milliseconds.

    Stage 2: Examining file name linkage ...
    917 reparse records processed.
    14591278 index entries processed.
    Index verification completed.
    Phase duration (Index verification): 3.08 hours.
    0 unindexed files scanned.
    Phase duration (Orphan reconnection): 15.34 minutes.
    0 unindexed files recovered to lost and found.
    Phase duration (Orphan recovery to lost and found): 20.26 seconds.
    917 reparse records processed.
    Phase duration (Reparse point and Object ID verification): 13.36 seconds.

    Stage 3: Examining security descriptors ...
    Security descriptor verification completed.
    Phase duration (Security descriptor verification): 385.45 milliseconds.
    2307992 data files processed.
    Phase duration (Data attribute verification): 0.73 milliseconds.
    CHKDSK is verifying Usn Journal...
    79313304 USN bytes processed.
    Usn Journal verification completed.
    Phase duration (USN journal verification): 10.96 seconds.

    Windows has scanned the file system and found no problems.
    No further action is required.

    3815412 MB total disk space.
    152923172 KB in 2671740 files.
    811364 KB in 2307993 indexes.
    0 KB in bad sectors.
    10270615 KB in use by the system.
    65536 KB occupied by the log file.
    3655251 MB available on disk.

    4096 bytes in each allocation unit.
    976745727 total allocation units on disk.
    935744440 allocation units available on disk.
    Total duration: 4.85 hours (17464377 ms).


    I'm running out of ideas of what to try :/ I need to delete this folder as its 30gb. Currently I'm having to go through and delete each folder one by one

    It really is odd. I just found another folder with more that won't delete:

    Deleting folders - it won't let me?-weird-dots.png

    The common thing seems to be they are folders that end in a . ??

    Even trying to do it in PS doesn't work: (even just to rename)

    PS F:\George-URBackup-Files\pagething.com\220304-0930\home\peekio\web\peekio.com\public_html\Computers\Companies> ren 'Adobe_Systems_Inc.' foo
    ren : Cannot rename because item at 'Adobe_Systems_Inc.' does not exist.
    At line:1 char:1
    + ren 'Adobe_Systems_Inc.' foo
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Rename-Item], PSInvalidOperationException
    + FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.RenameItemCommand


    Thanks!

    Andy
      My Computer


  2. Posts : 14,074
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #2

    One of the files in question is:

    F:\George-URBackup-Files\foo.com\220304-0930\home\peekio\web\foo.com\public_html\Business\Business_Services\Communications\Public_Speaking\M otivation\North_America\United_States\Washington_D.C.

    Another is:

    F:\George-URBackup-Files\pagething.com\220304-0930\home\peekio\web\peekio.com\public_html\Business\Business_Services\Communications\Public_Speakin g\Speakers_Bureaus\North_America\United_States\Washington_D.C.
    One thing I noticed in both folder names [path] posted is a space that looks out of place, don't know if that is a typing error in the post or is actually in the file name on the drive. If it's actually in the path might try correcting that then try deleting.
      My Computers


  3. NTN
    Posts : 969
    W10 19045.2546
       #3
      My Computers


  4. Posts : 23,465
    Win 10 Home ♦♦♦19045.4412 (x64) [22H2]
       #4

    @youradds


    Try deleting it in Safe Mode. If that doesn't work try the free program EMCO Unlock It.
    If you still can't delete it, then "Take Ownership" as mentioned above.
      My Computer


  5. Posts : 43,199
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #5

    Folder names do not normally end with a . - indeed if you try to create one with a name ending with a . that final . is removed for you.

    See e.g.
    windows - How to delete a folder that name ended with a dot (".")? - Stack Overflow

    For interest:
    Cannot Rename Folder with a Dot (".&quot

    The path you give is 194 characters.
    By way of a guess, if some files in it have a very long name, you might be exceeding the maximum path length.

    I too recommend Emco Unlockit- why? because it allows you to specify items for deletion which, if they cannot be deleted whilst windows is running, can be scheduled for deletion on restart, when it isn't.

    Otherwise, as usual, the other ways to deal with such things:
    - boot to a comand prompt, then delete
    - boot your PC from a bootable disk - then delete
      My Computers


  6. Posts : 100
    Windows 10
    Thread Starter
       #6

    Thanks - so renaming it actually worked! It renamed it without the . at the end, and I was able to delete it then:

    ren "\\?\F:\George-URBackup-Files\pagething.com\220304-0930\home\peekio\web\peekio.com\public_html\Computers\Companies\Apple_Inc." "\\?\F:\George-URBackup-Files\pagething.com\220304-0930\home\peekio\web\peekio.com\public_html\Computers\Companies\Apple_Inc"

    Is there a batch script to run this on a whole directory though? Its crazy you can't have a . at the end of a folder. You can do that no problem at all in Linux :/

    - - - Updated - - -

    Ok got it :) Thanks all! So the solution was to use Windows PowerShell and do:

    Code:
    rd "\\?\F:\George-URBackup-Files\"
    This lets you use special characters and delete the files/ folders :)

    Thanks again - I was going crazy with this!
      My Computer


  7. Posts : 43,199
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #7

    Good.. it's clearly something that has occasionally occurred to many years... question to me is - how do such 'invalidly named' folders get created?

    Command line options let you specify names more flexibly.

    As for a script - well, there are some good bulk rename tools for free at a Gui level, but whether they'd help with this - that would be a matter of trying it.
    E.g. Bulk renamer
    Bulk Rename Utility - Free File Renaming Software
      My Computers


  8. Posts : 100
    Windows 10
    Thread Starter
       #8

    I think the problem has come from urbackup ( urbackup.org ). I use it to backup my Ubuntu machines onto my Win10 machine. Clearly *nix doesn't care about . at the end of directories (as it works fine), but for some reason Windows 10 does. It odd they are able to be created like that (I know it has to do some munging on filenames sometimes if they have other characters in that Windows doesn't like, so not sure why it doesn't do it wth . at the end of folders)
      My Computer


  9. Posts : 14,074
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #9

    There are oddities, I have Linux Mint 21 on a computer along with working MS-DOS/Win3.1, WinXP, WinVista, Win7, Win10 and Win11 on other computers. Add to those is a 19" iMac All-in-One given to me with the older Mac OS X El Capitan that can't go to the new macOS. A client was trying to open Mac *.pages files sent her, no-go with Windows but the free cross-platform LibreOffice could open them, happy camper now.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 01:41.
Find Us




Windows 10 Forums