Jump to content

FTP


Recommended Posts

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:)

Link to comment
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
Link to comment
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?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...