C
C#14mo ago
pogrammerX

❔ Copy a file thats in use (using Shadow Copy or something)

Can someone please help me get this code to shadow copy?
private string CopyToTempFile(string sourceFilePath)
{
string destinationFilePath = GetTempFilePath();
while(File.Exists(destinationFilePath))
destinationFilePath = GetTempFilePath();


return destinationFilePath;
}
private string CopyToTempFile(string sourceFilePath)
{
string destinationFilePath = GetTempFilePath();
while(File.Exists(destinationFilePath))
destinationFilePath = GetTempFilePath();


return destinationFilePath;
}
5 Replies
pogrammerX
pogrammerXOP14mo ago
(yes the file is in use)
JakenVeina
JakenVeina14mo ago
Stack Overflow
Programmatically copy in-use files
In my C# code I want to be able to use some Shadow Copy mechanism in order to copy files that are being used by another process. I've seen that solutions exist on the web, in enterprise or command...
pogrammerX
pogrammerXOP14mo ago
there are no good examples for AlphaVSS or not one that only shows shadow copying
JakenVeina
JakenVeina14mo ago
okay
Accord
Accord14mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server