471,853 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,853 software developers and data experts.

cdonts names for attachments

I have a web application which saves files to a server and emails the file
as an attachment. I generate a unique name for each file by concatenating a
unique numeric string so the file name is unique and cannot be accidentally
be overwritten. I also store the original name of the file. Is there any way
to rename the attachment when I send it so it doesn't have the unique name
but rather the orignal one.
Jul 19 '05 #1
1 1219
CDO/CDONTS do not support renaming attachments, there is only one argument
relevant here (path/filename). The two other arguments deal with embedded
messages. Also, if you are using CDONTS, I strongly recommend you migrate
your code to use CDO.Message (see http://www.aspfaq.com/2026).

Some of the other mail objects might support renaming, or to continue using
CDO, just create a unique folder name, copy the file there using FSO, rename
it to the original name, attach that, then delete it.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Chris Kennedy" <no****@microsoft.com> wrote in message
news:O4**************@TK2MSFTNGP12.phx.gbl...
I have a web application which saves files to a server and emails the file
as an attachment. I generate a unique name for each file by concatenating a unique numeric string so the file name is unique and cannot be accidentally be overwritten. I also store the original name of the file. Is there any way to rename the attachment when I send it so it doesn't have the unique name
but rather the orignal one.

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Jason Steeves | last post: by
2 posts views Thread by Anthony Boudouvas | last post: by
2 posts views Thread by =?Utf-8?B?amxvcGVzMTUx?= | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.