I am trying to send an attachement to clients via an ASP.

I am setting the various HTTP headers and then writing out the contents of
the file via the Response object.

I am sending a csv file...

When a user is prompted to save or open the file if they choose to open the
file Excel will start...but then when they select File|Save As... in Excel
the filename is TestFile[1].csv rather than simply TestFile.csv or TestFile(1).csv

The problem lies in that the [] characters are not valid in filenames. It
is an annoying problem that I simply have not been able to find a solution
to.

The following is an extract of the code I am using:

<%@ Language=VBScript %>
<% Response.expires="0" %>
<% Response.buffer = True %>
...
<%
Response.ContentType = "application/vnd.ms-excel; name: TestFile.csv"
Response.AddHeader "Content-Disposition", "attachment; filename=TestFile.csv"
Response.ExpiresAbsolute = "08-Oct-1996 08:00"
Response.CacheControl = "max-age=0, must-revalidate"
...

' Write out the text for the file
...
%>


Any ideas ne1?