Purge files

We have two problems that can probably be solved using a single mechanism:

A) Some dealers hand enter their image URLs. When they load a purge file, all of that work is lost. It is also lost if they load an add file with already existing records in it (for example if they want to change the prices)

B) Some dealers load purge files every week and hence their stock is always sorted as "loaded during the past week" when in fact very little of it is new. 

When an add or purge file is about to be loaded, can we put it into an initial temp database and check the stock numbers against data already in the main database?
1) for purge files
1.1) if a stock number in an incoming file already exists, preserve the upload date and the image URL for that record, but over-write all other fields. (Weakness - there are dealers who re-number all there stock starting at 1 each time they upload. Maybe cross check the first 5 characters in the title field?)
1.2) if a stock number in the main database has no match in the incoming data, delete the record.
1.3) if a stock number in the incoming file has no counterpart in the main database, load it with the current upload date and image URL, unless the incoming data have an image field, in which case overwrite that field as well.

2) for add files
2.1) if a stock number in an incoming file already exists, preserve the upload date and the image URL for that record, but over-write all other fields. (Weakness - there are dealers who renumber all there stock starting at 1 each time the upload. Maybe cross check the first 5 characters in the title field?)
2.2) if a stock number in the incoming file has no counterpart in the main database, load it with the current upload date, unless the incoming data have an image field, in which case overwrite that field as well.