Hello every one How i can delete file after 7 days, i mean: i will send file to my friends and i want the VB file to delete it after 7 days. and during the 7 days they can't delete it or copy it ( if it's possible ). i'm using visual basic 6
Probably you need to do it in a different way. Something like keep the file encrypted and can be view only through your app so that after 7 days your application does not work and whatever he does with the file it will not help.
It's pretty hard, if not impossible, to restrict copying in Win environment. To prevent deleting you can only mark it as read only. However if the file can be secured with Win API, which will be applicable per user. If that is possible you can give it a try. As for deletion, run a batch operation at a convenient place of your program to search for files and delete.