Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
hSession=ftpOpen(host,userid,pswd,acct,1) if !IsNumber(hSession) Message("FTP Open Error",hSession) exit endif ftpChDir(hSession, fromdir) list=ftpList(hSession,"","ftp.tmp") files=FileGet("ftp.tmp")But I was wondering if I am missing something obvious, there must be a way to get this info without having to log on. The method I use takes an age as ftpList takes an age to download all the info for the folder, then I have to parse the info in the 'file' variable... this takes up to 40 seconds to sort out. If anyone has any ideas, I would love to hear them.
AddExtender("WWINT44I.DLL") tophandle=iBegin(0,"","") datahandle=iUrlOpen(tophandle,"http://www.windowware.com") headers=iHttpHeaders(datahandle) iClose(datahandle) iClose(tophandle) AskItemList("Headers were",headers,@tab,@sorted,@single) ;Add code to parse out last-modified date ;Store it off somewhere if newer than last stored date. exitOr maybe use this freeware utility: http://www.markwell.btinternet.co.uk/webmon/
AddExtender("WWINT44I.DLL") tophandle=iBegin(0,"","") connecthandle=iHostConnect(tophandle, "www.eluk.co.uk", @HTTP,"","") datahandle=iHttpInit(connecthandle, "GET", "/pages/chart.js", "",0) rslt=iHttpOpen(datahandle, "", 0, 0) xx=iReadData(datahandle, "C:\abc.txt") headers=iHttpHeaders(datahandle) iClose(datahandle) iClose(connecthandle) iClose(tophandle) AskItemList("Headers were",headers,@tab,@sorted,@single) exitworks, but not for files with the extension .shtml and 99% of the html files on the site have that extension!
AddExtender("WWINT44I.DLL") tophandle=iBegin(0,"","") ;connecthandle=iHostConnect(tophandle, "www.eluk.co.uk",@HTTP,"", "") ;datahandle=iHttpInit(connecthandle, "GET", "/pages/index.shtml", "",0) connecthandle=iHostConnect(tophandle, "www.winbatch.com",@HTTP,"", "") datahandle=iHttpInit(connecthandle, "GET", "/", "",0) if datahandle==0 err=iGetLastError() Message("Last Error",err) iClose(tophandle) exit endif myheader="If-Modified-Since: Fri, 20 Oct 2006 01:43:31 GMT" ;If the variant has not been modified since a valid If-Modified-Since date, ; the server SHOULD return a 304 (Not Modified) response. ;http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html rslt=iHttpOpen(datahandle, myheader , 0, 0) if rslt == 304 Message("Modified?", StrCat( "File has not been modified since ", myheader)) endif headers=iHttpHeaders(datahandle) Message("",headers) iClose(datahandle) iClose(connecthandle) iClose(tophandle) Message("All","Done") exitI noticed however that it will not work on the shtm file commented out in the above script. I think this is due to some limitation in the server.
Article ID: W17377
File Created: 2008:04:10:15:08:50
Last Updated: 2008:04:10:15:08:50