• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • 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
Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

 
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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