What is running on your w2k3 server? Is there a web server through which
the source/txt file is accessible? If so, sure, cfhttp can go out and grab
it over HTTP. Being a txt file, you wouldn't have to do anything fancy,
just point CFHTTP to the txt URL and then read the resulting file content
or even use the path and file attributes of CFHTTP to read and save the
file at the same time.

If there is no web server on the W2k3 server that holds the file, then
your options change.

If the two servers are on the same network, then you could run the CF
service as an account that has access to reach the file over UNC then just
use the UNC paths like you would normal paths in your cffile tag(s).

If they are not on the same network (and you can¹t set them up that way),
then there are many ways that you could have the w2k3 server ³send² the
file to the other machine when it generates it. I believe you said there
is a visual fox pro app on the w2k3 box. If you control that app and can
change it, it is capable of POSTing a file to a URL (url being a page you
setup on your CF server to accept a multipart/form-data post to upload the
file).

If you can¹t edit the VFP app, then you could install CURL on the W2k3 box
and still do the same thingŠ Have CURL post the file to a page you set up
on your CF server. Your CURL command would be a one liner that you could
either schedule with windows scheduler or you could set up a service on
the w2k3 box to monitor changes to the txt file and trigger the POST
automatically anytime it changes.




On 4/1/14, 5:37 AM, "Russ Michaels" <r...@michaels.me.uk> wrote:

>
>if you have direct access tot he server with the file then you would use
>CFFILE to copy it.
>If the file is only accessible over the web, then you can use CFHTTP to
>grab the file content and save to your local server. You will of course
>not
>get the raw file, only what is displayed in a browser.
>
>
>
>On Tue, Apr 1, 2014 at 9:50 AM, safo 2000 <safokas...@hotmail.com> wrote:
>
>>
>> i am a bit confused, this is the first time I do this kind of request so
>> bear with me.
>>
>> I am trying to do the following:
>>
>> i created a cf app on the source server (w2k3)
>>
>> <cfquery name="Param" datasource="lib_datasql" >
>>         SELECT proxloc from MainServer
>> </cfquery>
>> <cfset
>> 
>>fname="#param.proxloc#\@conv_#dateformat(dateadd("d",-1,now()),'dd-mm-yyy
>>y')#.txt">
>>
>> <cfif FileExists("#fname#") >
>>
>>         (the above will check for the file and find it)
>>
>>         then i need to copy the file to the cf server and work with it,
>> that's were you lost me.
>> <cfelse>
>>         not found
>> </cfif>
>>
>>
>> > >ok, so then how would I do the copy from w2k3 to cf9 server
>> >
>> > You would use CFHTTP to grab the content from the other server, and
>> > then save it as a file on your CF9 server.
>> >
>> > Personally I would do a separate CF app, scheduled in the CF
>> > administrator, that would periodically look for the file on the other
>> > server, and if it is there, grab it and download it.
>> >
>> > Then when your aggregation app runs, it just has to worry about
>> > content on your server.
>> >
>> > YMMV of course - I'm looking at it from the perspective of an
>> > application I worked on where the other server wasn't that reliable,
>> > and separating the "grab files from the other server" and "process
>> > files" helped troubleshooting tremendously.
>>
>> 
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358255
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to