How to delete file that has invalid name?
-
Possible Duplicate: http://superuser.com/questions/90227/files-with-illegal-filenames I've accidentally created -?.tgz file on my NTFS hdd (working under linux). And I'm just curious is it possible to delete it under Windows 7 using standard tools? Things I've tried: 1) move *.tgz die.tgz gave me same error "The file name you specified is not valid or too long" 2) File had no short windows name, so I was not able to delete it using short name
-
Answer:
Have you tried putting double quotes around the file name? You can also try typing "del " then keep pressing Tab when you are in the same directory as the file - this will loop through the files in that folder.
Viller at Super User Visit the source
Other answers
It's only a suggestion because I can't try now. In the past I have gotten rid of files with invalid names (mainly files with a terminating space) with this command: del "\\?\c:\full_path_to_file\-?.tgz"
Steve
Related Q & A:
- How to delete a particular line from a file?Best solution by Stack Overflow
- How convert .txt file to .Dat file in php?Best solution by Stack Overflow
- How to delete row from text file?Best solution by Stack Overflow
- How to delete a line from a .txt file in node.js?Best solution by c-sharpcorner.com
- How to file my small business name?Best solution by egov.maryland.gov
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.