Thanks for the clarification, Garbriel.

Tomorrow I'll have a go at getting this working.

I actually tried a variation of the escape character, as I thought that
might be what was happening, but I wasn't using replace at the time.

Hopefully, this will work...I'll post back about it.

Thanks, again...

Rick

On Wed, Jun 10, 2009 at 12:49 AM, Gabriel <coldfus...@evolution7.com> wrote:

>
> Rick,
>
> As Barney says that mysql uses '\' as an escape char, you'd need to replace
> '\' with '\\'.
>
> Check the docs on the replace function, the syntax would be:
>
>
> #replace(expandPath('\real_estate_data\smlc\daily_downloads\text_files\#toda
> y#\#name#'),
> "\", "\\", "all")#
>
> Replace(originalString, substringToReplace, stringReplacement, [scope])
>
> - Gabriel
>
> -----Original Message-----
> From: Rick Faircloth [mailto:r...@whitestonemedia.com]
>  Sent: Wednesday, 10 June 2009 2:41 PM
> To: cf-talk
> Subject: Re: How can I make this work with expandPath?
>
>
> yes, mysql 5.1...
>
> On Wed, Jun 10, 2009 at 12:37 AM, Gabriel <coldfus...@evolution7.com>
> wrote:
>
> >
> > Rick,
> >
> > Is it a mysql db? If so, see Barney's reply.
> >
> > Cheers,
> > Gabriel
> >
> > -----Original Message-----
> > From: Rick Faircloth [mailto:r...@whitestonemedia.com]
> > Sent: Wednesday, 10 June 2009 2:34 PM
> > To: cf-talk
> >  Subject: Re: How can I make this work with expandPath?
> >
> >
> > Thanks, Gabriel...I'll see if I can make that work.
> >
> > To your question about why the \'s are being deleted...below the
> > entire query.
> > It's always run fine since I was using the hardcoded path.  I have no
> > idea why the path would end up like "dinetpubwebroot
> >
> >
>
> eal_estate_datasmlcdaily_downloadstext_files2006_0609MF20060609_07114_ACR_1.
> > txt"
> >
> > Never seen that happen before...
> >
> >
> > <cfquery name="load_data" datasource="#application.dsn2#">
> >
> > load data infile
> >
> > 'd:/inetpub/webroot/real_estate_data/smlc/daily_downloads/text_files/#
> > today#
> > /#name#'
> >
> > <cfif #name# contains "ACR">
> >
> > *into* *table* smlc_acr_temp
> >
> > <cfelseif #name# contains "COM">
> >
> > *into* *table* smlc_com_temp
> >
> > <cfelseif #name# contains "LOT">
> >
> > *into* *table* smlc_lots_temp
> >
> > <cfelseif #name# contains "MUL">
> >
> > *into* *table* smlc_mul_temp
> >
> > <cfelseif #name# contains "OFF">
> >
> > *into* *table* smlc_off_temp
> >
> > <cfelseif #name# contains "REN">
> >
> > *into* *table* smlc_ren_temp
> >
> > <cfelseif #name# contains "RES">
> >
> > *into* *table* smlc_res_temp
> >
> > </cfif>
> >
> > fields terminated *by* '|'
> >
> > lines terminated *by* '\r\n'
> >
> > </cfquery>
> >
> >
> > On Wed, Jun 10, 2009 at 12:21 AM, Gabriel <coldfus...@evolution7.com>
> > wrote:
> >
> > >
> > > Rick,
> > >
> > > #replace(stringVar, '\', '/', 'all')#
> > >
> > > should give you the string as you need it, though I'd be more
> > > worried about why the \'s are being deleted during whatever
> > > operation you're trying to perform.
> > >
> > > - Gabriel
> > >
> > > -----Original Message-----
> > > From: Rick Faircloth [mailto:r...@whitestonemedia.com]
> > > Sent: Wednesday, 10 June 2009 1:45 PM
> > > To: cf-talk
> > > Subject: How can I make this work with expandPath?
> > >
> > >
> > > Hi, all...
> > >
> > > I'm running a query that uses
> > >
> > > load data infile
> > >
> > > 'd:/inetpub/webroot/real_estate_data/smlc/daily_downloads/text_files
> > > /#
> > > today#
> > > /#name#'
> > >
> > > The "/" have to be backwards to work in this case.  If they are
> > > turned around as "\" in the path, they get deleted in the
> > > translation...haven't figured that one out...
> > >
> > > Anyway, I wanted to use:
> > >
> > > load data infile
> > >
> > > "#expandPath('/real_estate_data/smlc/daily_downloads/text_files/#tod
> > > ay
> > > #/#nam
> > > e#')#"
> > >
> > > That works except for the fact that all the "/" get translated into
> > > "\" by expandPath and then are deleted from the resulting path,
> > > leaving it invalid.
> > >
> > > How can I code this to make it work with expandPath?
> > >
> > > Nothing I've tried causes a correct path to be translated by CF.
> > >
> > > Thanks for any feedback...
> > >
> > > Rick
> > >
> > >
> > > --------------------------------------------------------------------
> > > --
> > > ------
> > > ------------------------------------------------------------
> > > *"Ninety percent of the politicians give the other ten percent a bad
> > > reputation."*  Henry Kissinger
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323324
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to