RE: getting rid of spaces in file names
Where is the file name coming from? Are you pulling the file from your file system using cffile, or are people uploading it from a form, or...? -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 8:41 AM To: CF-Talk Subject: getting rid of spaces in file names Had not run been exposed to this problem before... using CFMail to send jpg files to designated recipients (and CFILE to record the file names)... if there's a space in the file name like my photo.jpg, that jpg is not sent via cmail can someone give me a quick tip on how to deal with this issue... not sure if eliminating that space or spaces in a filename is the way to go (or how to do that) Tim ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220687 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: getting rid of spaces in file names
Eliminating the space is the most definite way. I think that by including the filename in doublequotes it keeps it all together. my photo.jpg;the other file.doc Not completely sure, though. On 10/11/05, Tim Laureska [EMAIL PROTECTED] wrote: Had not run been exposed to this problem before... using CFMail to send jpg files to designated recipients (and CFILE to record the file names)... if there's a space in the file name like my photo.jpg, that jpg is not sent via cmail can someone give me a quick tip on how to deal with this issue... not sure if eliminating that space or spaces in a filename is the way to go (or how to do that) Tim ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220695 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: getting rid of spaces in file names
Uploading from a form ... then I query the DB and use cfmail like this: cfmail from=[EMAIL PROTECTED] subject=Photos for Quote No. #quote_id# to=[EMAIL PROTECTED] type=html query=mail_info group=client_id cfmailparam file=D:\webserver\domain_name.com\www\images\photos\from_customers\#fil ename# type=image/* /cfmail -Original Message- From: Munson, Jacob [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 11:15 AM To: CF-Talk Subject: RE: getting rid of spaces in file names Where is the file name coming from? Are you pulling the file from your file system using cffile, or are people uploading it from a form, or...? -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 8:41 AM To: CF-Talk Subject: getting rid of spaces in file names Had not run been exposed to this problem before... using CFMail to send jpg files to designated recipients (and CFILE to record the file names)... if there's a space in the file name like my photo.jpg, that jpg is not sent via cmail can someone give me a quick tip on how to deal with this issue... not sure if eliminating that space or spaces in a filename is the way to go (or how to do that) Tim ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220707 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: getting rid of spaces in file names
I ALWAYS remove spaces from file names (I actually remove anything other than letters, numbers, underscores, hyphens and periods). Normally, I just replace them with underscores or hyphens. It's just easier than worrying about them. If anyone complains, store the original name in the database along with the new renamed file name and use the original name for links and such. : ) cfset filename=my file.jpg cfset newfilename = replace(filename, , _, ALL) cffile action=rename source=/path/to/some/file/#filename# destination=/path/to/file/#newfilename# / ..:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 10:41 AM To: CF-Talk Subject: getting rid of spaces in file names Had not run been exposed to this problem before... using CFMail to send jpg files to designated recipients (and CFILE to record the file names)... if there's a space in the file name like my photo.jpg, that jpg is not sent via cmail . can someone give me a quick tip on how to deal with this issue... not sure if eliminating that space or spaces in a filename is the way to go (or how to do that) Tim ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220721 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54