Jump to content

How to upload file to FTP server?


ITSky8
 Share

Recommended Posts

Hello!

I found this seems suitable for my requirements, I would like to write a FTP Uploader, now I am using the Batch file, the content in the Batch is like this:

Batch 1 (Start.bat)

ftp.exe -s:upload.bat

Batch 2 (upload.bat)

open ftpservername

username

password

prompt off

cd upload/images

lcd "d:\upload\images"

mput *.jpg

bye

How to use the _FTPConnect to fullfill my requirements, thanks!

$dllhandle = DllOpen('wininet.dll')

$Open = _FTPOpen ('MyFTP Control',0)

If @error Then Failed("Open")

$Conn = _FTPConnect ($Open, $server,$username,$pass,21,1, 0x08000000,0)

If @error Then Failed("Connect")

Edited by ITSky8
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...