Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using CFFILE to copy an FTP file 1

Status
Not open for further replies.

Sinbad

Programmer
Nov 27, 2000
36
US
I would like to copy a file from another website in which the file name is ftp://159.247.160.79/pub/data/bill_info.txt onto my web server. Can I do this using CFFILE? Or how can this be done? Thank You. Allan Jagos
Web Developer
Robinson & Cole LLP
 
CFFILE is mainly for local file access between the server and client... for an outside site, you need to use CFFTP:

Try this:

<cfftp action = &quot;getfile&quot;
username = &quot;anonymous&quot;
password = &quot;none&quot;
remotefile=&quot;/pub/data/bill_info.txt&quot;
server = &quot;159.247.160.79&quot;
localfile=&quot;e:\inetpub\ >

<a href=&quot;/blah.txt&quot;>view file contents</a>


Once you have the file (here stored locally as blah.txt) you can do with it as you want. Then you can use CFFILE to move it around or something, if you want it in another dir, rename it, etc.

Hope that helps,

MG
 
Thanks a lot. Never used <cfftp> before and it worked great! Allan Jagos
Web Developer
Robinson & Cole LLP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top