c# - How to delete Zip file after copying into another folder -


how delete zip file after copying folder...i getting exception while deleting..it saying "the file being used process".

string pathstring1 = fullfilepath; string sourcefilename = path.getfilename(pathstring1); string foldername = path.getdirectoryname(pathstring1); string pathstring = path.combine(foldername, "uploaded"); if (!system.io.directory.exists(pathstring)) {     system.io.directory.createdirectory(pathstring);     string destfile = system.io.path.combine(pathstring, sourcefilename);     file.copy(pathstring1, destfile);      file.delete(pathstring1);     file.delete(filename); } 

if decompress zip-file, in using block or .dispose() object responsible decompressing. lib using?


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -