On my phone so excuse the brevity:

P = expandPath("...");
P = replace(P, "/", "\", "all");
P = replace(P, "\", "\\", "all");

Load data infile '#P#'

Cheers,
Barneyb

---
Barney Boisvert
[email protected]
http://www.barneyb.com

On Jun 9, 2009, at 9:40 PM, Rick Faircloth <[email protected]>  
wrote:

>
> So, the long version would be:
>
> #replace(expandPath('/real_estate_data/smlc/daily_downloads/ 
> text_files/#today#/#name#'),
> "\", "all")#
>
> Right?
>
> Gabriel's var version:
>
> <cfset filePath =
> "expandPath('/real_estate_data/smlc/daily_downloads/text_files/ 
> #today#/#name#')">
>
> #replace(filePath, "\", "all")#
>
> Correct?
>
> Rick
>
> On Wed, Jun 10, 2009 at 12:24 AM, Barney Boisvert  
> <[email protected]>wrote:
>
>>
>> MySQL uses the backslash as an escape character.  So after you use
>> expandPath, use replace to double them up.  That should take care  
>> of it.
>>
>> Cheers,
>> Barneyb
>>
>> ---
>> Barney Boisvert
>> [email protected]
>> http://www.barneyb.com
>>
>> On Jun 9, 2009, at 8:45 PM, Rick Faircloth <[email protected]>
>> wrote:
>>
>>>
>>> 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/
>>> #today#/#name#')#"
>>>
>>> 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:323323
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