• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 422
  • Last Modified:

How do I use CFFILE to copy a file from a remote web server?

I need to copy a very specific file from a web server ... and I hoped <cffile action="copy" would assist BUT I get this error:

The cause of this exception was: java.io.FileNotFoundException: C:\ColdFusion8\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\http:\fred.com\crm.txt (The filename, directory name, or volume label syntax is incorrect).

SO; it appears my 'source' won't point directly to fred.com\crm.txt ...

What on earth am I doing wrong!?

This is the exact CFFILE I'm trying to use:

<cffile action="copy" source="http:\\archangel.us\jonesnsa.txt" destination="c:\Inetpub\wwwroot\nfa\mq.txt">


Richard
0
rcbuchanan
Asked:
rcbuchanan
2 Solutions
 
Jones911Commented:
Source needs to be c:\foldername\filename.extention not http:\\server\filename
0
 
ZvonkoSystems architectCommented:
I was near to help you but then I sow you are faker or at least helping a faker do his job.
Or do you know ron jackson?
http://whois.net/whois/archangel.us
0
 
duncancummingCommented:
If you're trying to copy the file from someone else's webserver, you'd have to use CFHTTP to GET it, specifying the Path attribute for where you want to save the file to (or use the CFHTTP.FileContent variable)
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
rcbuchananAuthor Commented:
Good grief - Zvonko - the domain name - archangel.us was just a random domain I tried to think of .... as a bloody example. ( I have NO idea who or what owns the domain ... )  Perhaps I'll use domain.com/file.txt !!?!? as example.

OBVIOUSLY I'm not going to tell my domain name's file ... for the save of obvious privacy.

So relax mate. If you can help - great.

Richard
0
 
rcbuchananAuthor Commented:
Except for the conspiracy theory by Zvonko.
AGAIN - and to be explicit - the domain name / filename i provided was IMAGINARY / made up ... as an example. Contrary to Zvonko's impressions - I have NO desire to attack anyone's web site. Am working to download an output file for weather from a weather site that provides for public domain.
0
 
ZvonkoSystems architectCommented:
Tell other boys stories. Today you deleted that file you named in the EXACT cffile statement but when I have tested the file was there.
0
 
rcbuchananAuthor Commented:
Baloney. Shut up! Move on already.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now