Ran into a problem of moving files contained in several zip files to different folders. This is part of the code I used. It moves the files out of a zip file called test.zip (any name + .zip would do) in folder d:\data\start to a destination folder called d:\data\end. It would also work if d:\data\start contained more zip files. Sub zipcopier() Dim fs As Object, f As Object Dim FileInFolder As Object, sh As Object, ZipFile As Object, fileInZip As Object Dim FolderTo As Variant, FolderFrom As Variant FolderTo = "d:\data\end" FolderFrom = "d:\data\start" Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFolder(FolderFrom) 'procedure for zip-files For Each FileInFolder In f.Files If Right(FileInFolder.Name, 4) = ".zip" Then Set sh = ...
Blog over software als Access, Excel, SQL, Crystal Reports, Report Builder, Word, VBA, elfstedentochten en andere regionale zaken.