Hello all,
What i am trying to do is write a script in which i ftp into an another server and download the file back onto my server. What i want to do is , if its a newer file, i want to replace the older file on my server with this newer one. And if the the same file, i just want to delete the file i just downloaded.
So the way i approached it, is i downloaded the directory from the FTP site, and i wanted to compare the dates in that file to the dates i have on my server. Can anyone help me out, on how to search for a string like 'May 14 11:23' and then compare it to another date like 'May 10 10:55'? And if the date is newer, how can i approach replacing the file on my server, with the newer file?
Much help is appreciated.
What i am trying to do is write a script in which i ftp into an another server and download the file back onto my server. What i want to do is , if its a newer file, i want to replace the older file on my server with this newer one. And if the the same file, i just want to delete the file i just downloaded.
So the way i approached it, is i downloaded the directory from the FTP site, and i wanted to compare the dates in that file to the dates i have on my server. Can anyone help me out, on how to search for a string like 'May 14 11:23' and then compare it to another date like 'May 10 10:55'? And if the date is newer, how can i approach replacing the file on my server, with the newer file?
Much help is appreciated.