File Compression using the OS and NTFS file system

Thanks to a question in the newsgroups I did some research and updated the Microsoft Access Compatible Compression Solutions page with the below File Compression using the OS and NTFS file system section  (And I renamed the web site page from Microsoft Access Compatible Compression DLLs, OCXs, etc.)

Given that I do automated backups of the BE in some of my systems I'm thinking I will investigate this a bit more in the future when I have some time.  For example I will rename the backend MDB into a backup folder and then compact it back into the original backend folder.  However I append the date in yyyy-mm-dd format to the file name.  And then delete files older than the last ten copies.  Why ten?  <shrug>  Arbitrary number.

Hmm, I"d have to test this in a server environment too as the user may not have permissions to set that flag on a server.  Maybe.  Who knows.  

 

File Compression using the OS and NTFS file system

See Visual Basic > Files Directories Drives - Compress-uncompress an file or directory for sample code.   See File Compression and Decompression (Windows) at the Microsoft MSDN site for more details.  All you need to do is to set the compression state of the file and the OS will compress the file for you.

Note that I haven't tested this code myself.

Published Sat, May 31 2008 18:20 by Tony
Filed under: , , ,

Comments

# re: File Compression using the OS and NTFS file system

Polarzip light does this nicely but that requires an install. VB code is very clear.

Thursday, June 05, 2008 8:11 PM by Garry Robinson

# re: File Compression using the OS and NTFS file system

Sure but there's also free open source dll's and sample VBA code that will also allow you to zip and unzip files mentioned on that same page.  I'm using them inside some of my apps.

DLLs in the same folder as the MDB/MDEs don't require installation which I would imagine an Activex Control would.

However the main point of this blog entry is using the Windows OS and NTFS built in compression.

Thursday, June 05, 2008 8:21 PM by Tony

Leave a Comment

(required) 
(required) 
(optional)
(required)