Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compress Files thru Access via VBA
Message
General information
Forum:
Microsoft Office
Category:
Access
Environment versions
Microsoft Office:
Office 2007
Miscellaneous
Thread ID:
01351867
Message ID:
01352359
Views:
22
I think you need to add a code to filter the files you don't need manually in the loop.
I remember I was having the same problem, but I'm not certain if this was my solution or not.

>Hi Naomi,
>
>Thanks up front for the response. Hope you are doing well.
>
>I have used the sample you linked to in the past, however, this is a VBA application. I have modified it successfully to run under VBA (no strtofile function however...) but it still is not exactly what I am looking for. With WinZip I am able to add individual files to an existing zip archive. I can specifiy file extention so that only those type will be added / moved. With the native Xp compression and Shell object copyhere method, it seems to insist on adding all files regardless of type. In fact if I attempt to specify a file type, it errors out.
>
>Let me detail a bit more what I am doing. Every day, text files are dropped into a shared folder on a network resource. Each daily update cycle consumes the text files through an import function and then "cleans up" the shared folder by Zipping the text files into an archive. These archives are organized by YYYYMM so I have archives named 200801, 200802...200810, etc. I hope to emulate what is currently happening with WinZip by using the native WinXp compression capability. So far, I have not been successful. One problem I have encountered is if today I add text files to the current archive...200810..., tomorrow when I attempt to do so, the process complains that the folder where the files are being archived from already exists in the archive. Since all the files will be coming from the common shared resource, I do not have much of a choice without creating distinct folders, move the daily text files into the distinct folder, compress from the distinct folder and then after all importing is complete, remove the distinct (now empty) folder. Seems a bit cumbursome to me.
>
>Any ideas?
>
>TIA
>Vince
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform