Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem deleting a file 1

Status
Not open for further replies.

Eksistenz

IS-IT--Management
May 9, 2002
91
US
I've come across this problem before - a long time ago - but can't remember how I solved it!

A user has created an Autocad drawing called com5.dwg. I need to delete the file, but Windows tells me the file cannot be found.

I'm pretty sure it's because the OS thinks it's something to do with the com ports.

Any idea how I can get rid of the file? It's bugging the hell out of me!

Many thanks,
Paul
 
The file may be hidden. From command prompt, and in the actual directory, try
ATTRIB -r -s -h com5.dwg
 
I've tried that (sorry, should have said in the original question).
I've removed all attributes at a command prompt, to no avail. Trying to delete from a command prompt elicits the same answer as from Explorer - file not found - even though it will happily list the file using dir.

 
Could the file be in use by the system or a process? I don't know how you could check or how you could stop the file from being used, but that could also explain your error? -----------------------------------------------------
"It's true, its damn true!"
-----------------------------------------------------
 
Have you tried deleting from a command prompt?

You might want to bring up a command window, cd to the correct directory and then "dir" to make sure you are working with the correct file name and then try and delete.

HTH
 
Try dir /x where the file was saved, or use Autocad itself to delete it. It could be in .dxf format, too. pbxman
Systems Administrator

Please let Tek-Tips members know their posts were helpful.
 
Can you change the extension name or rename it?

Whats the size of the file?

If you can change the extension name to .txt , do this and open it in notepad. Delete everything within and save. Because theres nothing in the file, Windows will delete it. The reason I asked the size is because if the file if over 1mb for example, it'll take ages to open, and will probably open in Wordpad instead.

Whats the file system of the computer? If its FAT can you use a boot disk and delete it that way?

Have you ran checkdisk?

Regards
 
Thanks for all your replies.
The file is 216kb in size, and I can't do anything with it at all, either in a command prompt or in explorer.
I can't rename it (either name or extension), I can't open it (with notepad, or Autocad).
The file is sitting on an NTFS partition on an Exchange server (used to hold some user files, but now no longer does, hence my desire to delete it).
Whatever I try, I'm told the file does not exist. If I try to change the file attributes, Windows tells me it is 'Unable to set attributes for COM5'.
The server does not have a COM5 (only has COM1 & 2), but I'm sure that Windows thinks the file is a com port, simply becuase that's the name of the file. I'm goint ot trawl through the registry to see if I can find any COM5 references.

Any more ideas will be gratefully received.

Paul
 
Is com a reserved file name in NT? I can't remember. If it is then it will be very difficult to remove. You could try (from a cmd prompt):
DEL \\.\drive letter:\path\file name

If the drive is FAT you could try using the RM command:
rm //drive letter/path/file name

John
 
Well, bizarrely, I've managed to get rid of the little blighter!

I renamed the directory it was in, shared it, attached over the network and deleted the file.

Every time previosly that I've tried this, it's flatly refused.

Thanks to all of you for your responses.

Best regards,
Paul
 
I second that!!
Now printed and in my tech docs folder!
Nice one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top