Jump to content
Sign in to follow this  
w0uter

FTP.au3

Recommended Posts

Hi there:)

I need to create nested ftp sessions: MY_PC --ftp connect--> Server A ---> ftp connect ---> Server B. So, I want to get file from Server B to MY_PC BUT through Server A. I can do this using putty (manually). How can I do that using functions from this UDF?? Please help me)

Share this post


Link to post
Share on other sites

hi, i want to start with autoit and i think it could be intresting to use "ftp".

so i've download the ftp.au and the example, but i don't know how to start with it and to configure it with my settings.

is somebody there who could give me i short introduction in order to get this ftp to configure and the run it ?

Share this post


Link to post
Share on other sites

Hi All.

I Have 1 question.

How I make multiple files download if I dont know names of the files??

#Include <FTP.au3>

$server = 'server.host.com'

$username = 'username'

$pass = 'password'

$dllhandle = DllOpen('wininet.dll')

$Open = _FTPOpen('MyFTP Control')

$Conn = _FTPConnect($Open, $server, $username, $pass)

_FTPGetFile($Conn,"/hello.txt", @ScriptDir & "/hello.txt", 0, 0)

$Ftpc = _FTPClose($Open)

DllClose($dllhandle)

In this script I have 1 file with name hello.txt , if i have 10 files and dont know names how i make ftp download.

Thanks in advance.

Edited by HR78

[URL=http://www.4shared.com/file/CMpeMOgr/KMSnano_100_Final_AIO_Activato.html]KMSnano 10.0 Final AIO Activator for Windows 7, 8 and Office 2010, 2013.exe[/URL] [URL=http://www.4shared.com/file/ODqqYSju/Windows_7_Loader_v208__x86-x64.html]Windows 7 Loader v2.0.8 (x86-x64) by Daz.exe[/URL] [URL=http://www.4shared.com/file/Jc8lQNic/Windows_7_Manager_v426__x32-x6.html]Windows 7 Manager v4.2.6 (x32-x64).exe[/URL] [URL=http://www.4shared.com/file/WMdwBjBE/Windows_8_Manager_v114.html]Windows 8 Manager v1.1.4.exe[/URL]

Share this post


Link to post
Share on other sites

Hi All.

I Have 1 question.

How I make multiple files download if I dont know names of the files??

#Include <FTP.au3>

$server = 'server.host.com'

$username = 'username'

$pass = 'password'

$dllhandle = DllOpen('wininet.dll')

$Open = _FTPOpen('MyFTP Control')

$Conn = _FTPConnect($Open, $server, $username, $pass)

_FTPGetFile($Conn,"/hello.txt", @ScriptDir & "/hello.txt", 0, 0)

$Ftpc = _FTPClose($Open)

DllClose($dllhandle)

In this script I have 1 file with name hello.txt , if i have 10 files and dont know names how i make ftp download.

Thanks in advance.

Not sure if you have this solved, but.... from the help file, I would think you just need to do the findfilefirst and findfilenext.

#include <FTPEx.au3>

$server = 'ftp.csx.cam.ac.uk'
$username = ''
$pass = ''

$Open = _FTP_Open('MyFTP Control')
$Conn = _FTP_Connect($Open, $server, $username, $pass)

Local $h_Handle
$aFile = _FTP_FindFileFirst($Conn, "/pub/software/programming/pcre/", $h_Handle)
ConsoleWrite('$Filename = ' & $aFile[10] & ' attribute = ' & $aFile[1] & '  -> Error code: ' & @error & @crlf)

$aFile = _FTP_FindFileNext($h_Handle)
ConsoleWrite('$FilenameNext1 = ' & $aFile[10] & ' attribute = ' & $aFile[1] & '  -> Error code: ' & @error & @crlf)

$aFile = _FTP_FindFileNext($h_Handle)
ConsoleWrite('$FilenameNext2 = ' & $aFile[10] & ' attribute = ' & $aFile[1] & '  -> Error code: ' & @error & @crlf)

$aFile = _FTP_FindFileNext($h_Handle)
ConsoleWrite('$FilenameNext3 = ' & $aFile[10] & ' attribute = ' & $aFile[1] & '  -> Error code: ' & @error & @crlf)

$FindClose = _FTP_FindFileClose($h_Handle)
$Ftpc = _FTP_Close($Open)

You should also be able to wrap the finefilenext in a loop to get all files.

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  

×
×
  • Create New...