Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Can't delete file due to invalid file name

18 Jun 2012   #11

Windows 7 Ultimate 64-bit

Quote   Quote: Originally Posted by karlsnooks View Post
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 |

WIN is the key with the Microsoft flag on top.
Oh sorry. The file is in the root of D: and there is no pictures folder, because there is no Windows installed on that drive since I only use it for storage.

I still get this error: "The filename, directory name, or volume label syntax is incorrect".

Using "dir Schermafdruk*.*" shows me that the file is present in D:.

My System SpecsSystem Spec
18 Jun 2012   #12

Windows 8.1 Pro RTM x64

Hi Robin,

Try this:

At an elevated command prompt, enter cd /d d:\ in order to switch to the D drive. Next, enter dir to verify the filename(s) of the file(s) you wish to delete.

To delete the file, right-click in the command window and click Mark. Now, highlight the appropriate filename and press Ctrl + C to copy the information to the clipboard. At the command prompt, type del /f " and then right-click + Paste to enter the previously saved information (the filename). Finish by entering " (there should be no spaces between the " characters and the filename) and then execute the command. This should delete the file. Check by reissuing the dir command. Note that you may also use erase instead of del, and if you add the switch /p you will get a confirmation prompt. You will need to repeat this for each file that needs deleting. Copying the filename in this manner removes the possibility of errors creeping in when typing the name, as it is very easy to confuse some characters for others (such as O,o,0 and l,1,i,I to name a few). This misinterpretation of the characters in a filename can often give rise to the error you mention (what you type looks correct, but it isn't).
My System SpecsSystem Spec
18 Jun 2012   #13

Windows 7 Ultimate 64-bit

I've tried everything you guys suggested, but it just wouldn't work.

I did find a different way to get rid of the file, which was not the easiest since I encountered some Linux related problems while booting, but it worked! Using a Xubuntu Live usb I could just right click and delete/open/rename/move the file. I had tried Linux virtual machines before since my mobo is UEFI and therefore does not like anything but Windows, but I had trouble sharing files with the machine.

I will rep the ones that gave me some very interesting information, thanks guys!
My System SpecsSystem Spec

13 Aug 2012   #14

Windows 7 Home Premium 64-bit

Quote   Quote: Originally Posted by RobinSchouten View Post
I did find a different way to get rid of the file, which was not the easiest since I encountered some Linux related problems while booting, but it worked! Using a Xubuntu Live usb I could just right click and delete/open/rename/move the file.
I tried all the DOS and Windows & suggestions here and on another forum and nothing worked. In the end, the only way I could get the file to go away was to open the folder on a Linux virtual machine (which was a bit of trick in itself, mounting the external HD) and delete it.

Thanks, RobinSchouten, for that bit of advice!
My System SpecsSystem Spec

 Can't delete file due to invalid file name

Thread Tools

Similar help and support threads
Thread Forum
The Unattend answer file contains an invalid product key
I am responsible for building, updating, converting, building a sysprepped Windows 7 Pro master and deploy it on my company's computers. The final result is a build that includes full recovery capability, as most of these computers are used outside the office, some in remote locations. To...
Windows 7 USB/DVD Download Tool Invalid ISO file
Hey, I downloaded a Windows 7 (x64) ISO file with my MSDNAA license. I want to create a bootable Windows 7 on my USB flash drive to install it on my new laptop. However, after I selected the ISO file and click on the "Next" button I got an error message: "Invalid ISO file - The selected ISO...
Installation & Setup
Help file wont delete win 7 says there is no file
I have a download that got interrupted and now have a file with extension .file that cant be deleted. Cleaning software wont catch it, restarting not working either. Havent tried a restore yet
General Discussion
File too long or invalid error.
Am copying mp3 files from an external ntfs hd partition to a local hd partition. fileA which is very long copies fileB mozart_drott_1allegro
General Discussion
Invalid BOOT.INI file
Hi, I've got an old computer that is running Windows XP that I've decided to upgrade to Windows 7. After a bit of trouble, I managed to get through the installation process. At least I think I've got through the installation process - the problem starts soon after the bit where you have to name...
Installation & Setup
Invalid boot.ini file
Hello all, two days ago I upgraded FROM windows vista ultimate TO windows 7 x86 ultimate on my HP pavillion dv9005us laptop. I had no problems on vista, and it worked fine after an upgrade to 7 for a day. And then it rebooted and goes through the window that gives you the option to change...
BSOD Help and Support

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 11:54.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App