Re: Long Filename in NT Makes File Unusable
From: Alun Jones (alun_at_TEXIS.COM)
Date: 06/12/03
- Previous message: Star IT - M. Sproede: "AW: Long Filename in NT Makes File Unusable"
- In reply to: Damian Profancik: "Long Filename in NT Makes File Unusable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 12 Jun 2003 16:55:55 -0500 To: NTBUGTRAQ@LISTSERV.NTBUGTRAQ.COM
> -----Original Message-----
> From: Windows NTBugtraq Mailing List
> [mailto:NTBUGTRAQ@LISTSERV.NTBUGTRAQ.COM] On Behalf Of Damian
> Profancik
> Sent: Thursday, June 12, 2003 9:22 AM
> To: NTBUGTRAQ@LISTSERV.NTBUGTRAQ.COM
>
...
> However, the problem I am having is removing one of the files
> that 2000 has added the .tmp extension to. The file is 226
> characters in length (i.e.
> ntuser.pol.tmp.tmp.tmp. etc.). When I attempt to delete it
> off of a NT box from a 2000 or XP machine it won't let me.
...
> However, anytime I tried to delete the new file I created of
> 224 characters or even right-clicked on it, it crashed
> explorer with a Dr. Watson error. I thought Windows could
> handle filenames up to 256 characters. I was able to go back
> to the XP machine and delete the file I created. I am
> curious how the system created the 226 characters file.
Speaking from a developer standpoint, I'm well familiar with "MAX_PATH",
which holds the value 256. On FAT volumes, and in many tools, you can only
create a _path_ whose total length is 256 characters or less. Occasionally,
you can find this value met in such a way that makes it impossible to
perform some actions in the normal fashion - for instance, anything that
might add characters to the file name, or move it to temporary space. That
it crashes Explorer is quite definitely a bug; but that it gets created at
all should be of no great surprise.
Many tools and functions will accept longer paths than 256 if you provide
the path in a form that starts "\\?\" and is then followed by the path.
As for deleting using the short file name, don't automatically assume that
the short form will be first6~1.ext - you can find the short file name to
delete or rename with "dir /x".
Alun.
~~~~
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
Delivery co-sponsored by TruSecure
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
Free 14-day trial of New Threat & Vulnerability Notification Service
TruSecure's new IntelliShield(tm) web-based threat and vulnerability
service isn't your typical alert service. Supported by TruSecure's vast
intelligence resources - including the ICSA Labs - IntelliShield's early
warning, analysis, decision support, and threat management tools provide
organizations with unmatched intelligence to better protect critical
information assets. Experience it for yourself - just click below to begin
your free, no obligation 14-day trial today!
http://www.trusecure.com/offer/s0074/
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
- Previous message: Star IT - M. Sproede: "AW: Long Filename in NT Makes File Unusable"
- In reply to: Damian Profancik: "Long Filename in NT Makes File Unusable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]