Microsoft KB Archive/325630

= BUG: Open and Save As Dialog Boxes Use Decorated File Names for Files with Multiple Periods =

Article ID: 325630

Article Last Modified on 5/11/2006

-

APPLIES TO


 * Microsoft Internet Explorer (Programming) 5.5 SP2

-



This article was previously published under Q325630



SYMPTOMS
When you are streaming a file back as an attachment and that file contains two periods, the Save As dialog box may have unnecessary bracket decorations in the default file name.



CAUSE
This is a confirmed bug in Internet Explorer. Internet Explorer decorates the file name by inserting &quot;[n]&quot; decorations before the first period. Internet Explorer then tries to undecorate by looking for that pattern immediately before the last period of the file name. For files with two periods in the file name, this process is not successful.



RESOLUTION
To work around this bug, you must not allow files with two periods. You can also manually change the file name to remove the brackets.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
When you are streaming a file back from an Active Server Page (ASP) URL by using the &quot;content-disposition&quot; header with a  parameter set to a file name with two periods (for example, Testfile.doc.txt), the Save As dialog box (and the same dialog box before that, if there is one) may still contain the cache file name decoration (for example, Testfile[1].doc.txt).

Steps to Reproduce the Behavior
  Create an ASP page file that is named Test.asp by using the following code: <% Response.AddHeader &quot;Content-Disposition&quot;, &quot;attachment;filename=testfile.doc.txt&quot; %> hello  Put the ASP page file on a Web server and then locate that ASP page. Click Save when you are prompted to Open or to Save.

Notice that the file name still has the bracket decorations.

