Sign in to follow this  
Followers 0
ITSky8

How to upload file to FTP server?

2 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



Hi,

The _FTPPutFile () included in the UDF (FTP.au3) performs what you need to. Search for "FTP.AU3" in the sample script forum.

Bye,

FreeRider


FreeRiderHonour & Fidelity

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