I have to copy the file from one folder to another folder, however most of the times the file will be used by other person and i will get notification as file is read only.
When the file is readonly i am not able to copy the file. Can anyone help how to copy the file when the file is in readonly.
I am getting the file name as “~$Inputfile.xlsm” in source.
Since it is readonly the file is not copying and also it is not throwing any error. plz help.
is a temporary file name, which is created when the file “Inputfile.xlsm” is being accessed by another application. You may ignore files started with “~$” when you copy files.
Invoke code: Exception has been thrown by the target of an invocation.
Code I have written
Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory(Sourcedir, Destinationdir)