Jump to content

How do I connect to ftp and copy..


themax90
 Share

Recommended Posts

InetGet ( "ftp://site/test.txt", "test.txt", 1, 1)
$file = FileOpen("test.txt", 1)

If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
EndIf

FileWriteLine($file, "Line1")
FileWriteLine($file, "Line2" & @CRLF)
FileWriteLine($file, "Line3")

FileClose($file)

FileCopy("test.txt", "ftp://site/test.txt", 1)

FileDelete("test.txt")

What I want to do is download Test.exe for a site then write in it, then upload it to that site. Can I do this? How?

Edited by Agent Smith
Link to comment
Share on other sites

depends on the site.

you can easily dl from any site using inetget

uploading, would require you to make a script that simulates you going to your site, entering your account and pass, and clicking the apropriate buttons or whatever you need to do, to upload your file.

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

  • Developers

Or use a command line utility like Curl to upload the file.

The ftpupload is on the ToDo list but don't know when it will be done.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...