Zip delete in subfolder
Posted: Thu Feb 07, 2013 2:33 pm
Is it possible to delete all files from a folder that contains the same names as files in a zip file ?
Sharing, Teaching and Supporting coders of all ages and levels since 2009
https://www.codenstuff.com/forum/
clanc789 wrote:If you list them you can delete them, if its for updating you can overwritecopy them?ive been trying to use the unzip function from this http://www.codeproject.com/Tips/257193/ ... ws-Shell32 but whenever theres a files named the same in the directory it prompt me with do you want to overwrite, but i cannot find a way around it
imports system.io
My.Computer.FileSystem.deletedirectory(thepathofzipfile) = true
Dim cc = "the directory of your file"
Dim dirinfo As New System.IO.DirectoryInfo(cc)
Dim files() As System.IO.FileInfo
files = dirinfo.GetFiles("*", IO.SearchOption.AllDirectories)
For Each file In files
file.delete()
next