Sign in to follow this  
Followers 0
FreeRider

FTP.au3 *** ENRICHED ***

6 posts in this topic

#1 ·  Posted (edited)

Hello All,

As I'm working on ftp commands for one of my scripts and as I found several versions of the FTP.au3 UDF, I decided concatenate all the files I found on this forum into one.

On top of that I enriched this file with the "_FtpGetFolderContents" which is the counterpart of the _FtpPutFolderContents.

Special thanks to Zedna who helped me for the _FormatFileTime function.

Enjoy...

FreeRider

ftp_V3.au3

Edited by FreeRider

FreeRiderHonour & Fidelity

Share this post


Link to post
Share on other sites



Thanks, Christophe. I had about 5 different versions of FTP.au3 myself. This is a great include.

Share this post


Link to post
Share on other sites

Hi Catdaddy,

I'm happy if it helps... Of course if I have some new functions to share, I will post it.

Bye


FreeRiderHonour & Fidelity

Share this post


Link to post
Share on other sites

Hi.

Here are some notes:

1)

Global $rfiletime = DllStructCreate("dword;dword")
    Global $pfiletime = DllStructGetPtr($rfiletime)
    Global $rsystemtime = DllStructCreate("short;short;short;short;short;short;short;short")
    Global $psystemtime = DllStructGetPtr($rsystemtime)

could be as local inside _FormatFileTime Func if used in UDF way.

I used it as Global in my script for speed optimization only - because _FormatFileTime is called in loop.

2)

$size = BitShift($FileInfo[8],-32) + $FileInfo[9]

3)

Func _FTPGetFileSize($l_FTPSession, $s_FileName)

...

;DllCall('wininet.dll', 'int', 'InternetCloseHandle', 'str', $l_FTPSession) ;--> BUG

DllCall('wininet.dll', 'int', 'InternetCloseHandle', 'str', $ai_FTPGetSizeHandle)

...

4) Post also some simple examples for that UDF if you do that good job :-)

Share this post


Link to post
Share on other sites

Hi Zedna

Regarding your comments....

For point 1, I will try to use the function localy (inside my script) as it's called within loops...

For point 3, the modifcation is done.

For point 4, I promess to include some small samples with further postings (you're right it's easier to understand)

For point 2, I'm not sure to understand with which function the "$size = BitShift($FileInfo[8],-32) + $FileInfo[9]" is related.

Anyway,

Thanks for these useful remarks.

Bye and see you soon on the forums.


FreeRiderHonour & Fidelity

Share this post


Link to post
Share on other sites

Many thanks Christophe.


My Scripts[topic="73325"]_ReverseDNS()[/topic]Favourite scripts by other members[topic="81687"]SNMP udf[/topic][topic="70759"]Using SNMP - MIB protocol[/topic][topic="39050"]_SplitMon:Section off your monitor!, split your monitor into sections for easy management[/topic][topic="73425"]ZIP.au3 UDF in pure AutoIt[/topic][topic="10534"]WMI ScriptOMatic tool for AutoIt[/topic][topic="51103"]Resources UDF embed/use any data/files into/from AutoIt compiled EXE files[/topic]

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