| Windows 7: Can't delete file due to invalid file name |
16 Jun 2012
|
#1 | | Windows 7 Ultimate 64-bit Netherlands |
Can't delete file due to invalid file name Hey all!
I have a .png file on my secondary hard drive, which I cannot seem to delete. When I try to delete or rename it, it tells me: "The selected file name is invalid or too long".
I came across the programs Delinvfile and Unlocker, but they did not seem to work for me.
Appreciate any help! | My System Specs |
| System Manufacturer/Model Number Custom build OS Windows 7 Ultimate 64-bit CPU AMD Phenom II X4 955BE Motherboard Asrock 970 Extreme4 Memory 2x4gb DDR3 1600mHz Corsair Vengeance @1600mHz Graphics Card ASUS ENGTX580 DCII/2DIS/1536MD5 Sound Card On-board Monitor(s) Displays LG Flatron W2453V Screen Resolution 1920x1080 59Hz Keyboard Microsoft Wired Keyboard 600 PSU Cooler Master Real Power M620 Case Antec Three Hundred Gaming Case Cooling Arctic Cooling Freezer 7 Pro Hard Drives Samsung 830 128gb SSD,
Samsung 1TB F3 7200rpm Internet Speed Fibre speed, 100MB/s |
16 Jun 2012
|
#2 | | Windows 7 Pro X64 Space Coast of Florida |
Try this: Open an Elevated Command Prompt. Change to the directory (folder) the file is in. You do this using the cd command.
For instance, if the file is in your Pictures folder, you would enter: cd C:\Users\xxxxxxxx\Pictures (xxxxxxxx is your account name)
Once in the right directory (folder), use the del command as follows to see if you can delete it. If, for instance, the file starts with asdfg0000....... etc, del asdfg000*
That will delete any file that begins with the letters adsfg000, so be careful. Make sure you use enough of the beginning letters so the del command will only delete that file. | My System Specs | | System Manufacturer/Model Number Dell Precision 370 OS Windows 7 Pro X64 CPU Intel Pentium 4 Dual LP 3.4Ghz Memory 4GB DDR PC2-5200 ECC Graphics Card NVIDIA Quadro FX 3400/4400 Sound Card SoundMAX Integrated Digital Audio Monitor(s) Displays HP 22" w2207 LCD Screen Resolution 1680 x 1050 Hard Drives 300GB Maxtor 6L300RD PATA
128GB Kingston SV200S3128G SSD (boot)
1.5TB Seagate ST3150041AS SATA Internet Speed Cable via Road Runner 2MB Upload, 20MB Download |
16 Jun 2012
|
#3 | | |

Quote: Originally Posted by RobinSchouten Hey all!
I have a .png file on my secondary hard drive, which I cannot seem to delete. When I try to delete or rename it, it tells me: "The selected file name is invalid or too long".
I came across the programs Delinvfile and Unlocker, but they did not seem to work for me.
Appreciate any help! If you find a bunch of files don't want to delete in Explorer try scanning with Malwarebytes anti-malware. I had a registry hack that added NoModify to all files in Explorer. Malwarebytes got rid of it easily.
But it is quite possible to get filenames longer than Explorer can handle. In those cases use command line deletion.
Also if you search online there's a tool called TLPD.exe that searches for files with paths too long. | My System Specs | | System Manufacturer/Model Number HP Media Center OS Windows 7 32 bit CPU AMD 5200+ dual core Memory 2 GB Graphics Card NVidia GeForce 6150SE 128 MB Monitor(s) Displays CRT Screen Resolution 1280x1024 Keyboard PS/2 Mouse PS/2 Wheel Mouse Hard Drives 500 GB Sata internal :
SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives Other Info SIIG USB 3.0 PCIexpress card. |
17 Jun 2012
|
#4 | | Windows 7 Ultimate 64-bit Netherlands |

Quote: Originally Posted by Ztruker Try this: Open an Elevated Command Prompt. Change to the directory (folder) the file is in. You do this using the cd command.
For instance, if the file is in your Pictures folder, you would enter: cd C:\Users\xxxxxxxx\Pictures (xxxxxxxx is your account name)
Once in the right directory (folder), use the del command as follows to see if you can delete it. If, for instance, the file starts with asdfg0000....... etc, del asdfg000*
That will delete any file that begins with the letters adsfg000, so be careful. Make sure you use enough of the beginning letters so the del command will only delete that file. Thanks, but I can't seem to cd to D:/...
How come? | My System Specs | | System Manufacturer/Model Number Custom build OS Windows 7 Ultimate 64-bit CPU AMD Phenom II X4 955BE Motherboard Asrock 970 Extreme4 Memory 2x4gb DDR3 1600mHz Corsair Vengeance @1600mHz Graphics Card ASUS ENGTX580 DCII/2DIS/1536MD5 Sound Card On-board Monitor(s) Displays LG Flatron W2453V Screen Resolution 1920x1080 59Hz Keyboard Microsoft Wired Keyboard 600 PSU Cooler Master Real Power M620 Case Antec Three Hundred Gaming Case Cooling Arctic Cooling Freezer 7 Pro Hard Drives Samsung 830 128gb SSD,
Samsung 1TB F3 7200rpm Internet Speed Fibre speed, 100MB/s |
17 Jun 2012
|
#5 | | Windows 7 Ultimate x64 Service Pack 1 Doncaster, UK |
You need to enter the /D switch in the command. This allows you to change the current drive in addition to the current directory. So the command after the prompt reads as follows (note that the switch needs to be entered as shown): cd /d d:\ This works from both an administrative and user command prompt, but remember that the context and scope of any subsequent commands that you perform on the drive/directory is still the same as that to which you executed CMD in the first place. | My System Specs | | Computer type PC/Desktop System Manufacturer/Model Number Dwarf Dwf/11/2012 OS Windows 7 Ultimate x64 Service Pack 1 CPU Intel Core-i5-3570K 4-core @ 3.4GHz (Ivy Bridge) (OC 4.2GHz) Motherboard ASRock Z77 Extreme4-M Memory 4 x 4GB DDR3-1600 Corsair Vengeance CMZ8GX3M2A1600C9B (16GB) Graphics Card 2 x AMD Radeon HD7770 1GB CrossFired (OC 1100MHz/1250MHz) Sound Card Realtek High Definition on board solution (ALC 898) Monitor(s) Displays ViewSonic VA1912w Widescreen (VGA) Screen Resolution 1440x900 Keyboard Microsoft Comfort Curve Keyboard 3000 (USB) Mouse Microsoft Comfort Mouse 3000 for Business (USB) PSU XFX Pro Series 850W Semi-Modular Case Gigabyte IF233 Cooling 1 x 120mm Front Inlet 1 x 120mm Rear Exhaust Hard Drives OCZ Agility 3 SSD 120GB SATA III x2 (RAID 0)
Samsung HD501LJ 500GB SATA II x2
Hitachi HDS721010CLA332 1TB SATA II
Iomega 1.5TB Ext USB 2.0
WD 2.0TB Ext USB 3.0 Internet Speed NetGear DG834Gv3 ADSL Modem/Router (Ethernet) ~4.0 Mb/s (O2) Antivirus Avast! 8.0.1483 Browser IE 9 Other Info Optical Drive: HL-DT-ST BD-RE BH10LS30 SATA Bluray
Lexmark S305 Printer/Scanner/Copier (USB)
CTF-430 Tablet & Pen
WEI Score: 7.7/7.9/7.4/7.4/7.9
Asus Eee PC 1011PX Netbook (Windows 7 x86 Starter) |
17 Jun 2012
|
#6 | | Windows 7 Ultimate 64-bit Netherlands |
Ok, so I followed all your instructions, but it still does not work. I get a similar error: "The filename, directory name, or volume label syntax is incorrect". | My System Specs | | System Manufacturer/Model Number Custom build OS Windows 7 Ultimate 64-bit CPU AMD Phenom II X4 955BE Motherboard Asrock 970 Extreme4 Memory 2x4gb DDR3 1600mHz Corsair Vengeance @1600mHz Graphics Card ASUS ENGTX580 DCII/2DIS/1536MD5 Sound Card On-board Monitor(s) Displays LG Flatron W2453V Screen Resolution 1920x1080 59Hz Keyboard Microsoft Wired Keyboard 600 PSU Cooler Master Real Power M620 Case Antec Three Hundred Gaming Case Cooling Arctic Cooling Freezer 7 Pro Hard Drives Samsung 830 128gb SSD,
Samsung 1TB F3 7200rpm Internet Speed Fibre speed, 100MB/s |
17 Jun 2012
|
#7 | | Windows 7 Pro X64 Space Coast of Florida |
Can you post the name of the file? | My System Specs | | System Manufacturer/Model Number Dell Precision 370 OS Windows 7 Pro X64 CPU Intel Pentium 4 Dual LP 3.4Ghz Memory 4GB DDR PC2-5200 ECC Graphics Card NVIDIA Quadro FX 3400/4400 Sound Card SoundMAX Integrated Digital Audio Monitor(s) Displays HP 22" w2207 LCD Screen Resolution 1680 x 1050 Hard Drives 300GB Maxtor 6L300RD PATA
128GB Kingston SV200S3128G SSD (boot)
1.5TB Seagate ST3150041AS SATA Internet Speed Cable via Road Runner 2MB Upload, 20MB Download |
17 Jun 2012
|
#8 | | |

Quote: Originally Posted by RobinSchouten Ok, so I followed all your instructions, but it still does not work. I get a similar error: "The filename, directory name, or volume label syntax is incorrect". Peculiar since when I google asdfg000 I get a bunch of references to online games, profiles and blogs. How about posting a screen shot of the folder showing the file or whatever it is, in the screen shot? Something is weird. | My System Specs | | System Manufacturer/Model Number HP Media Center OS Windows 7 32 bit CPU AMD 5200+ dual core Memory 2 GB Graphics Card NVidia GeForce 6150SE 128 MB Monitor(s) Displays CRT Screen Resolution 1280x1024 Keyboard PS/2 Mouse PS/2 Wheel Mouse Hard Drives 500 GB Sata internal :
SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives Other Info SIIG USB 3.0 PCIexpress card. |
17 Jun 2012
|
#9 | | Windows 7 Ultimate 64-bit Netherlands |

Quote: Originally Posted by MilesAhead 
Quote: Originally Posted by RobinSchouten Ok, so I followed all your instructions, but it still does not work. I get a similar error: "The filename, directory name, or volume label syntax is incorrect". Peculiar since when I google asdfg000 I get a bunch of references to online games, profiles and blogs. How about posting a screen shot of the folder showing the file or whatever it is, in the screen shot? Something is weird. That was a file name example given by Ztruker.
The file it's about is a .png desktop screenshot taken when I was dualbooting with Ubuntu. When I got rid of it, I copied all the files I wanted to keep to my secondary hard drive including this desktop screenshot. The other files act normally, but this one is not.
The file name is: "Schermafdruk_van_(time)_(date).png". Without the quotes and with the correct variables. | My System Specs | | System Manufacturer/Model Number Custom build OS Windows 7 Ultimate 64-bit CPU AMD Phenom II X4 955BE Motherboard Asrock 970 Extreme4 Memory 2x4gb DDR3 1600mHz Corsair Vengeance @1600mHz Graphics Card ASUS ENGTX580 DCII/2DIS/1536MD5 Sound Card On-board Monitor(s) Displays LG Flatron W2453V Screen Resolution 1920x1080 59Hz Keyboard Microsoft Wired Keyboard 600 PSU Cooler Master Real Power M620 Case Antec Three Hundred Gaming Case Cooling Arctic Cooling Freezer 7 Pro Hard Drives Samsung 830 128gb SSD,
Samsung 1TB F3 7200rpm Internet Speed Fibre speed, 100MB/s |
17 Jun 2012
|
#10 | | MS Windows 7 Ultimate SP1 64-bit Austin, Texas |
Robin,
Is this file in the Pictures folder?
You have given the name but not the path for the file.
Try following:
go to an elevated command prompt and enter following commands: CD /D %userprofile%\Pictures dir schmerafdruk*.* does you trouble file show up? Go To an Elevated Command Prompt Elevated command prompt = Run CMD.EXE as administrator WIN | type CMD.EXE | do not hit Enter | CTRL+SHIFT+ENTER keycombo| YES WIN is the key with the Microsoft flag on top. | My System Specs | | System Manufacturer/Model Number Toshiba Satellite S875D-S7239 laptop OS MS Windows 7 Ultimate SP1 64-bit CPU AMD A10-4600M Motherboard AMD Pumori (Socket FT1) Memory 6.00 GB Dual-Channel DDR3 @ 798MHz (11-11-12-28) Graphics Card AMD Radeon HD 7660G Sound Card High Definition Audio Device Monitor(s) Displays Generic PnP Monitor (1600x900@60Hz) Screen Resolution 1600x900@60Hz Keyboard Standard PS/2 Keyboard Mouse HP Wireless Optical Mobile Mouse Model FHA-3410 Hard Drives SSD 119GB Corsair CSSD-V128GB2 ATA Device Internet Speed What the local pub, local coffee shop offers. Other Info Optical Drive:MATSHITA BD-CMB UJ160B ATA Device
Also have an Asus ha1002xp netbook with Win 7 Ultimate installed. Can't delete file due to invalid file name problems? All times are GMT -5. The time now is 02:31 AM. | |