FTP Issue

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
parsa033
Newbie
Posts: 4
Joined: Thu Aug 16, 2007 4:03 am

FTP Issue

Post by parsa033 » Thu Aug 16, 2007 4:10 am

I setup a FTP script that is simply putting a txt file in a folder on a windows hosted server. It works 1 out of 5 times.... sometimes it uploads the file correctly, sometimes it deletes it.

I also tested it by putting another script to delete the file then upload the new one. But this does the same thing...
I also tried to transfer the file by both binary setting and ASCII

I'm not sure what to do??

Here is the code:

Code: Select all

FTPDelFile>ftp://ftp.URL.com,URL.com,xxx,21,/wwwroot/temp/myfile.txt
FTPPutFile>ftp://ftp.URL.com,URL.com,xxxx,21,c:\Main Folder\temp\myfile.txt,/wwwroot/temp/,A

I do have a FTP Client and it works fine... I am running DSL on my PC
"425 Cannot open data connection." is the error that shows up...
Please help
thanks

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Aug 16, 2007 6:52 am

Syntax is wrong. First, you must specify just the server address/name. Remove the protocol identifier. Second, you're not specifying a name for the target file. Looks like you're trying to upload a file and name it as a directory. Type should be A for ascii if it's a text file. Should be:

Code: Select all

FTPDelFile>ftp.URL.com,URL.com,xxx,21,/wwwroot/temp/myfile.txt
FTPPutFile>ftp.URL.com,URL.com,xxxx,21,c:\Main Folder\temp\myfile.txt,/wwwroot/temp/myfile.txt,A
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mom
Newbie
Posts: 1
Joined: Mon Aug 20, 2007 7:11 am

Deleting FTP files

Post by mom » Mon Aug 20, 2007 7:51 am

I have tried the syntax FTPDelFile>http://www.ftpsite.no,username,password,21,/home/logs/ut/200*.txt,I, but it dosent work. Do you have to specify the the complete filename instead of using 200*.txt?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Aug 20, 2007 7:57 am

FTPDelFile needs the complete filename.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

parsa033
Newbie
Posts: 4
Joined: Thu Aug 16, 2007 4:03 am

Post by parsa033 » Tue Aug 28, 2007 4:22 pm

This is what Im using

Code: Select all

Let>FTP_TIMEOUT=25
FTPPutFile>ftp.URL.com,USERNAME,PASS,21,c:\Main Folder\TEMP\myfile.txt,/wwwroot/myfile.txt,A

I still get a "425 cannon open a data connection error."

Please help...

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Aug 28, 2007 4:35 pm

That usually means you need passive mode. Try setting passive on:

Let>FTP_PASSIVE=1

If you search Google for the terms "ftp 425 cannot open data connection" you will find lots of issues with various FTP clients all suggesting you need to use passive mode.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts