Sign in to follow this  
Followers 0
Freshprince

FTP

5 posts in this topic

Hey everyone!

I want to connect to a FTP server,and if that is done,i want to download files and save them directly to a special

directory,but it doesnt work.

$server = 'ftp://ftp.bla bla'
$username = ''
$pass = ''

$Open = _FTP_Open('Comes in here the Directory?? ')
$Conn = _FTP_Connect($Open, $server, $username, $pass)
_FTP_FileGet($l_FTPSession, $s_RemoteFile, $s_LocalFile [, $fFailIfExists = False, [ $dwFlagsAndAttributes = 0 [, $l_Flags = 0 [, $l_Context = 0]]]])


$Ftpc = _FTP_Close($Open)

My Questions are: I got no username or pw needed,so i can erase that ,and erase it from $conn?

At the Position FTPFileGet where come things like,the download directory,where it should be saved

etc?

Would be very pleased,if someone can help me:)

Share this post


Link to post
Share on other sites



And a Question ive forgotten:

Is it possible,to see how far the progress of the download is?

Sorry for the Questions,im just a beginner... :mellow:

Share this post


Link to post
Share on other sites

Try to check if there is error in connection, try putting this and you'll know if there is an error in connection.

$Conn = _FTP_Connect($Open, $server, $username, $pass) 
If not @error then 
_FTP_FileGet($l_FTPSession, $s_RemoteFile, $s_LocalFile [, $fFailIfExists = False, [ $dwFlagsAndAttributes = 0 [, $l_Flags = 0 [, $l_Context = 0]]]])
else 
Msgbox(Default,"Error","Error occured " & @error)
endif

It will show you if there is an error in connection.

For the second part of question, to see the progress, try using

_FTP_ProgressDownload

Share this post


Link to post
Share on other sites

Hey!very nice that If Loop:)And thanks for the progress bar tip;)

But:

My Props are,i dont know where i have to fill in the download path

where i fill in the directory in which it should be saved

AND i dont know,what do i fill in ,in the field FtpOpen?For What stands this?

Share this post


Link to post
Share on other sites

I don't think its very subtle issue, but I think its rather odd to ask this, cause all of it is given in the help file, the syntax and all.

Try reading that before posting your question(s)/suggestion(s) .

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0