Jump to content

Recommended Posts

Posted

Hi.

I've been tinkering with wouters et al http://www.autoitscript.com/forum/index.ph...2473&hl=ftp.au3 (thanks w0uter / Beast / Bill Mezian & Dick Bronsdijk) and contributions.

When i log into an FTP account i can successfully get the filelisting. If i delete some files using _FTPDelFile(), even if i use _FTPClose() and re-open an FTP connection, reading the filelist still gives me the original filelist, even when i clear the string result beforehand

While 1

$files = ""

$Open = _FTPOpen('FTP')
$Conn = _FTPConnect($Open, 'ftp.thedomain.com, 'username', 'password')
_FtpSetCurrentDir($Conn,$project)
$files = _FTPListFiles($Conn)

MsgBox(0,"Filestring",$files);on my system get same list even if files deleted.

_FTPDelFile($Conn,"some filename")
$Ftp = _FTPClose($Open)

WEnd
I guess it is a cache issue - any way to force a true refresh ??

Many thanks as ever :)

Posted

Ok. Did some MSDN searching and found the solution - simply setting the following flag during 'FTPFindFirstFile'

INTERNET_FLAG_RELOAD = 0x80000000

Forces a download of the requested file, object, or directory listing from the origin server, not from the cache. The GopherFindFirstFile, GopherOpenFile, FtpFindFirstFile, FtpGetFile, FtpOpenFile, FtpPutFile, HttpOpenRequest, and InternetOpenUrl functions utilize this flag.

:)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...