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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFFTP PutFile transfers 0 bytes... 1

Status
Not open for further replies.

minsan

Technical User
Jan 8, 2001
18
US
I've searched this forum's archive and found a thread back in May that was similar to my problem, but that was left unanswered. So I'd like to re-open the issue. Hopefully someone can help this time around.

I'm trying to move or copy a file from a Cold Fusion server (running Win2000) using CFFTP to another server (in this case we'll call also win2000). Before I even tried CFFTP, I used a spearate FTP client to test my ftp access. Using CuteFTP, I was able to create folders, upload files, etc. But using CFFTP, all files I upload end up with a filesize of 0 bytes. Here's my code:

<cfftp action=&quot;OPEN&quot; server=&quot; username=&quot;username&quot; password=&quot;password&quot; stoponerror=&quot;Yes&quot; connection=&quot;Connected? #CFFTP.Succeeded#<br>

<cfftp action=&quot;PUTFILE&quot; stoponerror=&quot;Yes&quot; localfile=&quot;docs/myfile.doc&quot; remotefile=&quot;uploads/myfile.doc&quot; transfermode=&quot;AUTO&quot; connection=&quot;#CFFTP.ReturnValue#<br>

Even stranger is when #CFFTP.ReturnValue# will output &quot;226 Transfer complete&quot; but when I go to to check the file, it exists there with a file size of 0 bytes. I've tried different combinations of CFFTP settings and I've made sure I have full FTP access to the uploads folder, but I still get the same results.

Please help. A solution would be great. If there isn't a solution, and if somebody knows if this is just a bug, please confirm or deny. Thanks in advance.

minsan
 
The parameter LocalFile must be an Absolute Path.

Example:

<cfftp action=&quot;PUTFILE&quot;
stoponerror=&quot;Yes&quot;
localfile=&quot;C:\myFolder\myfile.doc&quot;
remotefile=&quot;uploads/myfile.doc&quot;
transfermode=&quot;AUTO&quot;
connection=&quot;www1&quot;>
- tleish
 
I think that just did the trick. Thanks very much!!

minsan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top