>If my application does log on as another user, can it just copy the file and then immediatly revert back to the original user?
Joel,
Yes, it does. I had a similar task: providing regular read-write access to a folder with DBF files from within a VFP application, while preventing users to access this folder in Explorer.
I used API calls LogonUser, ImpersonateLoggedOnUser and RevertToSelf. The last call is actually answers your question.
It took time to make it work though. Possible issues:
- you need to reconnect to required network resources (network drives, printers) for the temporary user
- make sure that the path to temporary FoxPro files is valid for impersonated user -- important when you run SQL statements, reindex tables and so on under temporary user's credentials.