Jump to content

Recommended Posts

Posted (edited)

I have this code


 

#include <FTPEx.au3>
#include <MsgBoxConstants.au3>

Local $sServer = 'test' ; UNIVERSITY OF CAMBRIDGE ANONYMOUS FTP SERVER
Local $sUsername = 'test'
Local $sPass = 'test'

Local $hOpen = _FTP_Open('MyFTP Control')
Local $hConn = _FTP_Connect($hOpen, $sServer, $sUsername, $sPass,0,4231)
If @error Then
    MsgBox($MB_SYSTEMMODAL, '_FTP_Connect', 'ERROR=' & @error)
Else
    MsgBox($MB_SYSTEMMODAL, '_FTP_Connect', 'polaczylem sie')
EndIf

Local $iFtpc = _FTP_Close($hConn)
Local $iFtpo = _FTP_Close($hOpen)

 

I wrote PORT 4231 , but when I try use script I have error -1 ;/

What is wrong? Anybody know?

Edited by Maches
Posted (edited)

Your login data is valid?

  • Yes, then edit your op and ask Admin of server you have the right to store? As it's a anonymus server usualy you can only read (_FTP_FileGet) from it.
  • No, you are sure login data in real script is valid and server uses port 4231 and non passive mode? Usualy used port = 21. Try both $iPassive=0 and second try $iPassive=1
  • Try a FTP-Client like FileZilla and tell what's happend.
Edited by AutoBert
Posted (edited)

yes, data is valid. I using it by filzilla all the time but need to use it now in my script autoit

Im using filezilla and it's working fine but I have to use SFTP (SSH File transfer Protocol) , not ftp... when I use FTP in filezilla isn't working too.

I have admin rights

Edited by Maches
Posted

The FTP UDF in AutoIt can not connect to SFTP sites.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Posted

Use Putty, you can find examples using it on here somewhere.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Posted

@Maches if you don't find a way to Connect with AutoIT with SFTP protocol then maybe you can Just automate the process using portable filezilla, you can do it using @SW_HIDE flag and control send and then is going to be transparent in some way.

Kind Regards
Alien.

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
×
×
  • Create New...