RonnieJ 0 Posted August 18, 2011 Hi all I am kind of new to autoit and requiring some help please.I need to connect to an FTP server = Sorted#include <File.au3>#include <Date.au3>#include <FTPEx.au3>$server = '11.11.11.11'$username = 'YES'$pass = 'NO'$Open = _FTP_Open('SessionName')$Conn = _FTP_Connect($Open, $server, $username, $pass)I need to get todays date off a file on a FTP server and make sure it's todays date if if is copy the file and then delete it.;If there is a file - download itif not @ERROR then ConsoleWrite("Getting file " & $aFile[10] & @CRLF) $Ftpp = _Ftp_Fileget($Conn, FTPFileLocation' & $aFile[10], LocalFileLocationA' & $aFile[10]) ;Make a copy and rename it to NewFileName FileCopy("LocalFileLocationA" & $aFile[10], "LocalFileLocationB") ;Copy FileLocation123.txt FileMove("LocalFileLocationB", "LocalFileLocationC", 1) ;Delete File from FTP $DelFTP = _FTP_FileDelete($Conn, 'FTPFileLocation' & $aFile[10]) ConsoleWrite("Executing " & "del " & 'FTPFileLocation' & $aFile[10] & @CRLF)endif$Ftpc = _FTP_Close($Open)This part works as wellThe part I can't get working is getting the date confirmed as todays date off a FTP server if it is todays date copy the downlaod the file. Can anyone please help me. Thanks Share this post Link to post Share on other sites
kaotkbliss 146 Posted August 18, 2011 you can use the date macros (@Mday, @Mon, @Year depending on the format of the date in the file) and compare them to the date you find in the file 010101000110100001101001011100110010000001101001011100110010000001101101011110010010000001110011011010010110011100100001My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueekWe're gonna need another Timmy! Share this post Link to post Share on other sites