General discussion

Locked

I downloaded a file but...

By GuruOfDos ·
now I can't delete it!

Following on from a thread where a user had this problem, I thought I'd post a tip I discovered, which also illustrates a problem in Windows which many people have had problems with.

When using file sharing apps (legitimately or otherwise) there are often situations where a particlar file (.jpg, .mp3 or whatever) has been stored on a machine and the name of the file changed. Many P2P file sharing networks identify a file using a hash code containing information such as file size etc. enabling multiple sources of an identical file to be identified even if the name has been changed by an individual user.

The problem with multiple sources occurs when a non-Western language has been used to name a file. Many Asian or Japanese versions of Windows use double-bytes to define certain characters and this is where the problem occurs. Western versions of Windows use an ANSI/ISO character set whereby one character is defined in one byte. A Western version of Windows can quite happily create a file on disk using these double byte, non-ANSI characters, but just try and rename or delete the file and you come unstuck. A common error message is 'Unable to rename (or delete)file. File in use by another application'. This also happens if somebody is uploading the file from you (i.e. the file IS actually in use, if not by you!). Shutting down Kazaa, WinMX or whatever other file-sharing app you use has no effect. The file is still locked. Similar problems are also experienced when downloading perfectly legitimate or requested files sent as email attachments. I have been sent many Word docs by Asian colleagues, as well as PDF's from Taiwanese or other Asian manufacturers (datasheets etc.) which suffer from this same problem...it's a case of 'thanks very much for the information, but now I can't delete the file!'

Hitting CTRL-ALT-DEL to terminate any apps or processes which maybe using the file in question provides no help. Nothing seems to be using the file!

Windows is simply unable to do a damn thing with the file. You can't move it, delete it, or rename it. So you are stuck with it...or so it appears.

There is a solution, however, and the answer has been spotted in the Microsoft Knowledge base, but it's one of those obscure problems that many typical users of file sharing apps are unaware of.

The trick is as follows. Either exit to DOS from Windows or boot your system using a DOS (W98 Startup) floppy. Locate the file on the hard drive and then rename it in DOS. DOS will only display an 8.3 filename, but this should be good enough to locate the relevant file, and it does make renaming easier! Assume for example that the DOS name for the rogue file is anythi~1.mp3 (or .avi, .jpg or any other file type).

Having found and navigated to the folder containing the file, type in

ren anythi~1.mp3 rename.mp3

Exit from DOS and return to Windows or reboot the machine to Windows. A simple search for this new filename (or browsing in Windows Explorer to the appropriate folder) will locate the newly named 'rename.mp3'. As the filename now complies with normal Western ANSI character naming, the file can now be moved renamed or deleted within Windows as easily as any other file. Of course, if all you intended to do was delete the file in the first place, this can be done at the DOS prompt.

I may be teaching Grandma to suck eggs here, but in a recent spot survey of a group of techs at a recent get-together, I was the only person who had found an answer to this problem, short of formatting the HDD and reloading everything or just 'ignoring' the dodgy file!

I expect most of you may already be aware of this issue and it's resolution...I post for the benefit of those who aren't!

Mike

This conversation is currently closed to new comments.

18 total posts (Page 1 of 2)   01 | 02   Next
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Jellimonsta In reply to I downloaded a file but.. ...

Could you not actually just delete the file through DOS if this was your desired action? You could also try the 'move' command.

Collapse -

Perhaps

by GuruOfDos In reply to

if you just wanted to delete the file!

But if you wanted to 'keep' the file, just rename it with a sensible name, move it to another folder or burn it to CD then you wouldn't be able to do this from within Windows. This is the point! Windows will not allow copy, move or delete of a filename using non-ANSI characters. You cannot change the name to something sensible in Windows either...you have to rename the file in DOS.

Windows however will let you CREATE a filename with non-standard (or non-printing) characters. You can download the file from a Japanese user and it will be stored on your disk with the non-ANSI filename. Try to rename it to get rid of the gibberish and the only way to do this is in DOS!

This is the connundrum that puzzles the average user. How can the OS allow creation of a non-ANSI filename, then not be able to change it, delete it or move the file!!

When you use a program to burn a file to CD, such as Nero or EZ-CD Creator, you are prompted to rename any files that do not match the ISO9660 or Joliet file name formats. Most CD burning programs scan filenames before even attempting to write a CD, then flag up warnings when a filename does not conform.

If this sort of check was built into Windows, then any attempt to download or save a file from the internet could flag up a message like 'Filename contains non-ANSI characters invalid in this language version of Windows. Please rename the destination file' then a 'Save As' dialogue box could be used to change the filename BEFORE a write to disk occurs.

Collapse -

Sounds good but

by HAL 9000 Moderator In reply to Perhaps

How would you acomplish this on a NTFS partition like that used in XP or Y2K Server/Pro or worse still 2003 Server?

I know it's a silly question but as DOS will not read these partitions you are stuck with Windows. So how would you get around this problem?

Collapse -

START, RUN, CMD

by mrbill- In reply to Sounds good but

START, RUN, CMD

You are at the DOS prompt, that should work. What say G.O.D.

Collapse -

And G.O.D. sayeth...

by GuruOfDos In reply to START, RUN, CMD

That just about covers all the angles! Of course, DOS CAN read NTFS!!! There are special boot disks you can download to do it, containing NTFS <> FAT translators!

"And on the seventh day, G.O.D. rested. He looked upon His Creation and saw that it was good. However, he had a nagging feeling that by 8.30am on Monday, it would all start to turn to rat s**t again!"

Collapse -

Been there, done that, got the T-shirt...

by mrbill- In reply to I downloaded a file but.. ...

I have run into the same problem before and used DOS to ren and del the file. Everyone should know at least the basic commands of DOS, if only to know the roots of our OSs. And to do some of the things the GUI wont let you.

Collapse -

Here is the Microsoft Info

by GuruOfDos In reply to I downloaded a file but.. ...

http://tinyurl.com/pgsd

The Microsoft knowledge base says this refers to W9x, but it applies to all other versions of Windows (ME, 2K, XP) as well...FYI!

The MS information also only refers to extended characters (ASCII 128 and above) but double-byte (non western) characters are the biggest cause of the problem with the explosion of file sharing and sending attachments :-)

Collapse -

Nicely recovered

by Oz_Media In reply to I downloaded a file but.. ...

Well done, Mike!
Much more eloquent than the last lashing you posted on this matter! I am usually the crass and uncaring one how will slap someone in the face for asking a dumb question, I think you had the guy crawling under his bed!

I appreciate your info, this will save me a lot of time because this is usually my LAST resort when dealing with this problem for users.
I'd rather reformat the damn PC than play in DOS for an hour or so.

Cheers,
OM

Collapse -

by Jellimonsta In reply to Nicely recovered

Provided you know the location of the file you can easily navigate to it in DOS and change the name (or delete the file). I think you should be able to handle that, right OZ? P

Collapse -

Most definitely

by Oz_Media In reply to

Just the whole routine of using DOS to rectify a Windoze problems pisses me off. I never grew up with DOS (it was around but I was still beating up the computer geeks back then)so I hate to resort to it. I did go geek on Pong though ;-)

Yes I can handle that, but it is just another reason to stop buying Windows garbage. Too bad everyone else still does.

Back to Networks Forum
18 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums