3

Possible Duplicate:
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

Viller
  • 206

2 Answers2

2

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
  • 256
0

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.