Case 1: If no file is in USE from INSTALLDIR while running the PS script, Backup .Zip file successful.
Case 2: If any file is in USE from INSTALLDIR while running the PS script, Full Backup .Zip un-successful.
I need your help in Case 2 for taking backup of INSTALLDIR successful even file in use (i mean we can skip the in USE file in backup process) please.
I've searched around a bit on this, and it looks like that's possible, but it requires you to create the ZipArchive object first, enumerate the files yourself, and add them each individually with the CreateEntryFromFile method (https://msdn.microsoft.com/en-us/library/hh485720.aspx). Then you can catch (and ignore) the IOExceptions that come from a file that can't be read. Something like this: