What's new

Can't delete file

persius

Member
This is a new one for me because I've never encountered this problem before. I have a directory with 1 file in it but windows won't allow me to delete it. I've attached a screenshot of the warning that pops up.
I have attempted to delete the directory along with the file and just the file alone without success. I have also tried to rename the file but that option is also not available.

Any help will be appreciated.
 

Attachments

  • screen shot.jpg
    screen shot.jpg
    72.9 KB · Views: 9

My Computer

System One

  • OS
    8.0
    Computer type
    PC/Desktop
    System Manufacturer/Model
    HP

A Guy

Righteous Dude
Team Member
VIP Member
Gold Member
Hello, a couple of ways. You can take ownership to get access to the file (use carefully, do not take ownership of whole drives, etc.)


Install a small program called Lockhunter which will either be able to unlock the file to delete it, or offer to delete it on next restart


Good luck

A Guy
 

My Computer

System One

  • OS
    Windows 10 Home x64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom
    CPU
    INTEL Core i5-750
    Motherboard
    ASUS P7P55D
    Memory
    KINGSTON HyperX Fury Black Series 8GB (2 x 4GB) 1866Mhz
    Graphics Card(s)
    EVGA GTX750
    Monitor(s) Displays
    LG 27MP33HQ 32" IPS LED
    Screen Resolution
    1920 x 1080
    Hard Drives
    Samsung 840 Evo 120 GB, 2 x SEAGATE 500GB Barracuda® 7200.12, SATA 3 Gb/s, 7200 RPM, 16MB cache
    PSU
    ANTEC TruePower New TP-550, 80 PLUS®, 550W
    Case
    ANTEC Three Hundred Illusion
    Cooling
    COOLER MASTER Hyper 212 Plus, 3 x 120mm 1 x 140mm Case
    Internet Speed
    20 + Mbps
    Browser
    Vivaldi
    Antivirus
    Avast

persius

Member
Hello, a couple of ways. You can take ownership to get access to the file (use carefully, do not take ownership of whole drives, etc.)


Install a small program called Lockhunter which will either be able to unlock the file to delete it, or offer to delete it on next restart


Good luck

A Guy
A Guy: Thanks for your suggestion. I'll give that a try.
 

My Computer

System One

  • OS
    8.0
    Computer type
    PC/Desktop
    System Manufacturer/Model
    HP

persius

Member
Hello, a couple of ways. You can take ownership to get access to the file (use carefully, do not take ownership of whole drives, etc.)


Install a small program called Lockhunter which will either be able to unlock the file to delete it, or offer to delete it on next restart


Good luck

A Guy
Hi again. I tried both your suggestions and the result is the same. I'm informed that the name of the file is too long and therefore I can't delete it.
When I look at the type of file this is, it's listed as: internet shortcut
 

My Computer

System One

  • OS
    8.0
    Computer type
    PC/Desktop
    System Manufacturer/Model
    HP

A Guy

Righteous Dude
Team Member
VIP Member
Gold Member
Hmmm, Unlocker didn't give you the option to delete the file on next reboot? See if you can right click on the file and change the extension to .txt, then try again to delete it

A Guy
 

My Computer

System One

  • OS
    Windows 10 Home x64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom
    CPU
    INTEL Core i5-750
    Motherboard
    ASUS P7P55D
    Memory
    KINGSTON HyperX Fury Black Series 8GB (2 x 4GB) 1866Mhz
    Graphics Card(s)
    EVGA GTX750
    Monitor(s) Displays
    LG 27MP33HQ 32" IPS LED
    Screen Resolution
    1920 x 1080
    Hard Drives
    Samsung 840 Evo 120 GB, 2 x SEAGATE 500GB Barracuda® 7200.12, SATA 3 Gb/s, 7200 RPM, 16MB cache
    PSU
    ANTEC TruePower New TP-550, 80 PLUS®, 550W
    Case
    ANTEC Three Hundred Illusion
    Cooling
    COOLER MASTER Hyper 212 Plus, 3 x 120mm 1 x 140mm Case
    Internet Speed
    20 + Mbps
    Browser
    Vivaldi
    Antivirus
    Avast

Win8-VPN

New Member
Wow, here are a whole bunch of thoughts. (As-is, no warranty).

1) Apparently you're getting an error message that the path or filename is too long for Windows to delete the file. I'm guessing the problem is more about communicating to the Windows shell what file you're trying to delete, as opposed to some problem with actually deleting it. MS Command Prompt and Cygwin both provide multiple ways to specify a given file besides the full file name, for example using wild cards, regular expressions, etc. For example, I would try something like "rm A*" in Cygwin or "erase A*" in Command Prompt, where "A*" is a wildcard that expands to only the file you want to delete. Individually, I'd give this maybe a 50% chance of working, but if it doesn't work, maybe something further down this list would :)

2) Likewise, you might be able to use Command Prompt or Cygwin with wildcards to rename or move the file, so its path and filename are shorter. If you can successfully do that, I'm guessing deleting it would then work.

3) You could also try using Command Prompt or Cygwin to delete the whole directory, making sure that file is the only one in it. For example "rm -r <Directory name>" in Cygwin.

4) In the old days (when I was a kid), MS DOS used to require file names to have maximum 8 characters, upper case, and with no special characters like space or comma. If I'm not mistaken, Command Prompt can still refer to files with this type of name. In general, I think take the first 6 characters of the name, followed by ~ and a numeral. For example, "This is a long filename.txt" can also be referred to by something like THISIS~1.TXT. So I would try to use something like "erase THISIS~1.TXT" in Command Prompt.

5) Maybe a compiled program could overwrite or delete the file, as a way to circumvent the OS shell. For example, you could try opening the file with vi in Cygwin or some other low-level text editor, removing the file's contents, and re-saving. Or you could write your own compiled code to delete this file, but I would make sure to use file handling commands native to the language, like 'open' or 'write', as opposed to any command that invokes the OS shell.

6) Finally, maybe you could just overwrite the file by redirecting the output from some other command, for example "echo 'Null set' > A*" in Cygwin, where "A*" is again a wildcard that expands to just the file you want to overwrite.
 

My Computer

System One

  • OS
    Windows 8.1

persius

Member
Hi all.
I've had a chance to read all of your suggestions and to begin, you're asking the wrong person to start writing codes or dealing with DOS. In fact the last time I used DOS was.......15 years ago at the least.

Here is the screenshot of what this file looks like and what options are available to me.
 

Attachments

  • Untitled-1.jpg
    Untitled-1.jpg
    71 KB · Views: 3

My Computer

System One

  • OS
    8.0
    Computer type
    PC/Desktop
    System Manufacturer/Model
    HP

billmcct

New Member
The NTFS file system has a maximum file name length of 280 characters. Unless your file name is over 280 you shouldn't be getting the error your receiving. Did you even try booting to safe mode?
 

My Computer

System One

  • OS
    win 8.1 Core
    Computer type
    Laptop
    System Manufacturer/Model
    HP dv6
    CPU
    i3
    Browser
    Palemoon 28.x

persius

Member
Yes I have. I've done everything that has been suggested. One detail I haven't mentioned is that this file is on a external (backup) drive. I have attempted to move it to another location and then delete but no result.
 

My Computer

System One

  • OS
    8.0
    Computer type
    PC/Desktop
    System Manufacturer/Model
    HP

A Guy

Righteous Dude
Team Member
VIP Member
Gold Member
OK, download Download FileKiller - MajorGeeks , tiny exe file, 100% safe. Right click Run as Administrator> Press Select> Navigate to the file> Kill Files On Grid >>

A Guy
 

My Computer

System One

  • OS
    Windows 10 Home x64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom
    CPU
    INTEL Core i5-750
    Motherboard
    ASUS P7P55D
    Memory
    KINGSTON HyperX Fury Black Series 8GB (2 x 4GB) 1866Mhz
    Graphics Card(s)
    EVGA GTX750
    Monitor(s) Displays
    LG 27MP33HQ 32" IPS LED
    Screen Resolution
    1920 x 1080
    Hard Drives
    Samsung 840 Evo 120 GB, 2 x SEAGATE 500GB Barracuda® 7200.12, SATA 3 Gb/s, 7200 RPM, 16MB cache
    PSU
    ANTEC TruePower New TP-550, 80 PLUS®, 550W
    Case
    ANTEC Three Hundred Illusion
    Cooling
    COOLER MASTER Hyper 212 Plus, 3 x 120mm 1 x 140mm Case
    Internet Speed
    20 + Mbps
    Browser
    Vivaldi
    Antivirus
    Avast

persius

Member
OK, download Download FileKiller - MajorGeeks , tiny exe file, 100% safe. Right click Run as Administrator> Press Select> Navigate to the file> Kill Files On Grid >>

A Guy
A Guy.

Thanks for your suggestion. I was very hopeful that this would work but sadly.......... no. I have no idea what is wrong with this file. As always, the reason is "file name is too long".
This makes no sense.
 

Attachments

  • Untitled-1.jpg
    Untitled-1.jpg
    78.2 KB · Views: 5

My Computer

System One

  • OS
    8.0
    Computer type
    PC/Desktop
    System Manufacturer/Model
    HP

A Guy

Righteous Dude
Team Member
VIP Member
Gold Member
Try this?


A Guy
 

My Computer

System One

  • OS
    Windows 10 Home x64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom
    CPU
    INTEL Core i5-750
    Motherboard
    ASUS P7P55D
    Memory
    KINGSTON HyperX Fury Black Series 8GB (2 x 4GB) 1866Mhz
    Graphics Card(s)
    EVGA GTX750
    Monitor(s) Displays
    LG 27MP33HQ 32" IPS LED
    Screen Resolution
    1920 x 1080
    Hard Drives
    Samsung 840 Evo 120 GB, 2 x SEAGATE 500GB Barracuda® 7200.12, SATA 3 Gb/s, 7200 RPM, 16MB cache
    PSU
    ANTEC TruePower New TP-550, 80 PLUS®, 550W
    Case
    ANTEC Three Hundred Illusion
    Cooling
    COOLER MASTER Hyper 212 Plus, 3 x 120mm 1 x 140mm Case
    Internet Speed
    20 + Mbps
    Browser
    Vivaldi
    Antivirus
    Avast

TechnoMage

Active Member
Power User
Too bad you're reluctant to use DOS. If you brought that problem to me, that's exactly what I'd use.
I'd boot up your system with my DOS Utilities Flash Drive and then run a program called "NTFS 4 DOS" which would then let me navigate to any file on the HD, and delete it if that's what I wanted to do. I've actually done that many times. Long Live DOS!

TM :cool:
 

My Computer

System One

  • OS
    Win-8.1/Pro/64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Home Made
    CPU
    AMD 8 Core
    Motherboard
    Gigabyte, Ultra Durable, GA-970A-DSP3
    Memory
    Crucial, 8GB
    Graphics Card(s)
    AMD Radeon HD 5450 (2 GB)
    Sound Card
    On Board
    Monitor(s) Displays
    24" LG
    Hard Drives
    Sandisk, SSD 120GB, 8TB Seagate backup drive
    PSU
    Antec Earthwatts, 650
    Case
    Pac-Man Case
    Keyboard
    HP Professional
    Mouse
    GearHead Wireless
    Internet Speed
    5 Meg
    Browser
    Firefox
    Other Info
    Using Classic Shell on Win-8.1 /pro/64

persius

Member
Just an update. The problem has been resolved. It turns out that my computer reached the age where it was literally dying. The motherboard had capacitors that were popping and components were ceasing to operate correctly. My solution? I had to purchase a new PC with Win 10.
 

My Computer

System One

  • OS
    8.0
    Computer type
    PC/Desktop
    System Manufacturer/Model
    HP

A Guy

Righteous Dude
Team Member
VIP Member
Gold Member
Windows 11 releases October 5th :D

A Guy
 

My Computer

System One

  • OS
    Windows 10 Home x64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom
    CPU
    INTEL Core i5-750
    Motherboard
    ASUS P7P55D
    Memory
    KINGSTON HyperX Fury Black Series 8GB (2 x 4GB) 1866Mhz
    Graphics Card(s)
    EVGA GTX750
    Monitor(s) Displays
    LG 27MP33HQ 32" IPS LED
    Screen Resolution
    1920 x 1080
    Hard Drives
    Samsung 840 Evo 120 GB, 2 x SEAGATE 500GB Barracuda® 7200.12, SATA 3 Gb/s, 7200 RPM, 16MB cache
    PSU
    ANTEC TruePower New TP-550, 80 PLUS®, 550W
    Case
    ANTEC Three Hundred Illusion
    Cooling
    COOLER MASTER Hyper 212 Plus, 3 x 120mm 1 x 140mm Case
    Internet Speed
    20 + Mbps
    Browser
    Vivaldi
    Antivirus
    Avast

TechnoMage

Active Member
Power User
Just an update. The problem has been resolved. It turns out that my computer reached the age where it was literally dying. The motherboard had capacitors that were popping and components were ceasing to operate correctly. My solution? I had to purchase a new PC with Win 10.
That was an expensive solution to your problem. It would NOT have been MY solution.
So, what did you do about saving your data files from the old HD. Just curious.
TM :cool:
 

My Computer

System One

  • OS
    Win-8.1/Pro/64
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Home Made
    CPU
    AMD 8 Core
    Motherboard
    Gigabyte, Ultra Durable, GA-970A-DSP3
    Memory
    Crucial, 8GB
    Graphics Card(s)
    AMD Radeon HD 5450 (2 GB)
    Sound Card
    On Board
    Monitor(s) Displays
    24" LG
    Hard Drives
    Sandisk, SSD 120GB, 8TB Seagate backup drive
    PSU
    Antec Earthwatts, 650
    Case
    Pac-Man Case
    Keyboard
    HP Professional
    Mouse
    GearHead Wireless
    Internet Speed
    5 Meg
    Browser
    Firefox
    Other Info
    Using Classic Shell on Win-8.1 /pro/64

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

Top