Andy1
asked on
Copy a file using Volume Shadow Service
I am using Visual Studio 2008 working with VB.NET.
What I want to do is create a small app for myself that can make a copy of some of my files which are often locked by the system.
I'm told this can be done in a way, you can get a copy of whats written on the disk by accessing a snapshot of the file using the volume shadow service. I understand this may not be the entire file if data hasn't yet been written.
Can anyone provide me with a function which can access the VSS API for XP or Vista where I can pass it the path/name of the source file and the path/name of the destination file and have it make the copy?
Cheers.
What I want to do is create a small app for myself that can make a copy of some of my files which are often locked by the system.
I'm told this can be done in a way, you can get a copy of whats written on the disk by accessing a snapshot of the file using the volume shadow service. I understand this may not be the entire file if data hasn't yet been written.
Can anyone provide me with a function which can access the VSS API for XP or Vista where I can pass it the path/name of the source file and the path/name of the destination file and have it make the copy?
Cheers.
ASKER
I still haven't gotten far with this... i had already downloaded the sdk.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also, there is a CodeProject page giving a use like yours: http://www.codeproject.com/KB/dotnet/makeshadowcopy.aspx