Jump to content

[SOLVED] Sync Directories


Asheeown

Recommended Posts

I have a php script on a cron job running every half an hour that FTPs to a given server and downloads files, heres a list of everything it does:

 

    1. Checks file names in the FTP directory with a database table

    2. Downloads any new files and imports the file information into that table

    3. Uploads all the information inside that file into a different database table

    4. Deletes file on the local machine that was downloaded, as to not take up space

 

Now, the FTP directory keeps a full 60 days worth of files which is about 8640 files,  everything so far works perfectly, efficiently and doesn't need to be changed. 

 

However I want to add a function, in everything it does I want it to check if any of the files in the database have been deleted on the FTP server.  As to have only the 60 days worth of file records in the table.  Any ideas on how to accomplish this?  Just say it if you need any more information or to restate the question

Link to comment
https://forums.phpfreaks.com/topic/41324-solved-sync-directories/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.