You can probably do it in VBScript, but why over - engineer the solution? QVD file is a regular file, it can be deleted manually at any time. As far as I understand, the event of the database being restored to an earlier stage is not an everyday event, right?
You can also reduce the data in the QVD file by loading just the amount of data that you need (using where conditions) and then re-writing the original file with the reduced amount of data.
On any normal system I would say that the database restores should be pretty rare but the system that I am dealing with has a pretty volatile database and is restored on a monthly basis. Lovely right?!?!
Anyway, so you are saying that I can just load the QVD with a where clause and then store it over the QVD that already exists? Is there a special command for re-writing or will store work?
How about something like this:
With your database in a restored state, load the record with the latest date.
(maybe select * from table, order by date_filed asc)
Compare this with the latest date in your QVD file.
If the QVD has data newer than the database, do a full reload of the database and store everything back to the QVD
If the QVD has data older than the database, proceed with the incremental load as normal.
For the number of times you restore your database, might be quicker to manually delete the QVD file.