RonnieJ Posted August 18, 2011 Share 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 Link to comment Share on other sites More sharing options...
kaotkbliss Posted August 18, 2011 Share 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 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now