• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Can't delete this file

dabuddha

Lifer
OS: Windows 2000

I'm working on this java program that creates output files and I had a slight little bug that was concatenating filenames together. Hence I ended up with a file with a huge name. I can not seem to delete it. In windows explorer, when I hit the delete key, nothing happens. I tried right clicking and selecting delete, nothing. Here's what it does in dos:

10/07/2003 12:04p 77,350 SacModelMessage_1.xmlSacModelMessage_2.xm
lSacModelMessage_3.xmlSacModelMessage_4.xmlSacModelMessage_5.xmlSacModelMessage_
6.xmlSacModelMessage_7.xmlSacModelMessage_8.xmlSacModelMessage_9.xmlSacModelMess
age_10.xmlSacModelMessage_11.xmlSacModelMessage_12.xml

D:\Data\XMLFiles>del SacModelMessage_1.xmlSacModelMessage_2.xmlSacModelMessage_3
.xmlSacModelMessage_4.xmlSacModelMessage_5.xmlSacModelMessage_6.xmlSacModelMessa
ge_7.xmlSacModelMessage_8.xmlSacModelMessage_9.xmlSacModelMessage_10.xmlSacModel
Message_11.xmlSacModelMessage_12.xml
The system cannot find the path specified.

D:\Data\XMLFiles>del SacModelMessage*
File Not Found

D:\Data\XMLFiles>


Any ideas?
TIA
 
can you place all the other files in a temp folder, and then del *.*

I recall something about using subst and assigning the file to a virtual drive or something...but can't think of it right off the top of my head...Doh. Maybe use DOSSHELL, or some other GUI to find the file, to delete it?
 
Originally posted by: rbV5
can you place all the other files in a temp folder, and then del *.*

I recall something about using subst and assigning the file to a virtual drive or something...but can't think of it right off the top of my head...Doh. Maybe use DOSSHELL, or some other GUI to find the file, to delete it?

I tried the temp folder deal. no go there. haven't tried the virtual drive yet.

EDIT: Even tried to remove the folder that the file is in after copying the other files out. No go



D:\Data\XMLFiles>del *.*
D:\Data\XMLFiles\*.*, Are you sure (Y/N)? y
File Not Found

D:\Data\XMLFiles>dir
Volume in drive D is New Volume
Volume Serial Number is 3894-F23F

Directory of D:\Data\XMLFiles

10/07/2003 12:35p <DIR> .
10/07/2003 12:35p <DIR> ..
10/07/2003 12:04p 77,350 SacModelMessage_1.xmlSacModelMessage_2.xm
lSacModelMessage_3.xmlSacModelMessage_4.xmlSacModelMessage_5.xmlSacModelMessage_
6.xmlSacModelMessage_7.xmlSacModelMessage_8.xmlSacModelMessage_9.xmlSacModelMess
age_10.xmlSacModelMessage_11.xmlSacModelMessage_12.xml
 
Got it. I just wrote a quick and dirty Java program to take care of it for me. Still a pain though
thanks for the help ! 🙂
 
If it ever happens again, it is because the file name is too long.

In Windows: Rename it to something shorter.

In DOS: You have to type del SacMod~1.xml
 
Originally posted by: DOSfan
If it ever happens again, it is because the file name is too long.

In Windows: Rename it to something shorter.

In DOS: You have to type del SacMod~1.xml

That would depend on whether you're using cmd.exe or command.com.

cmd.exe can handle whatever filenames Windows can
command.com is limited to 8.3
 
Originally posted by: DOSfan
If it ever happens again, it is because the file name is too long.

In Windows: Rename it to something shorter.

In DOS: You have to type del SacMod~1.xml

Tried both of those. Neither one worked. In windows, it wouldn't even let me rename the thing. And in Dos, it just told me that the file does not exist.
 
Originally posted by: WobbleWobble
Originally posted by: DOSfan
If it ever happens again, it is because the file name is too long.

In Windows: Rename it to something shorter.

In DOS: You have to type del SacMod~1.xml

That would depend on whether you're using cmd.exe or command.com.

cmd.exe can handle whatever filenames Windows can
command.com is limited to 8.3

So... If Windows cannot handle the length of a file name (I have seen it happen on several occasions, that is how I know about this) then cmd.exe would not be able to handle it either?

Originally posted by:dabuddha
Tried both of those. Neither one worked. In windows, it wouldn't even let me rename the thing. And in Dos, it just told me that the file does not exist.

Wow. That is the first time I have heard of that..... You really snafu'ed that one didn't you? 😛

Then I salute you for figuring out a way to delete it! 😀
 
So how do you delete files like this if you don't know JAVA? I have the same problem with some files.
 
One thing I've found through experience is check the Security settings in the Properties of the file. If you're logged in as Administrator, check to see if you have permissions to delete the file - if not, give yourself Full Control and then try deleting it. 🙂
 
Back
Top