+ Reply to Thread
Results 1 to 2 of 2

VBA do divide zip into volumes that won exceed 28 Mb and adds "Part 1" "2" to the name

  1. #1
    Registered User
    Join Date
    07-14-2015
    Location
    lisbon
    MS-Off Ver
    2016
    Posts
    68

    VBA do divide zip into volumes that won exceed 28 Mb and adds "Part 1" "2" to the name

    Hi everyone,

    I have a VBA code that according the folder where excel file (VBA) is:
    - Will zip all sub folders (and itīs content) into zip files with the same names
    - name the zip files according to the folders name
    - Destination folder must be the exact same folder where the excel file with the VBA code is
    - The folder will be / is a windows network folder

    Imagine my excel file is at folder name

    HTML Code: 
    , and inside that folder i have sub Folders:
    apple
    grapes
    almonds

    What i have is a macro that will zip on that same folder Fruit, and return files: apple.zip + grapes.zip + almonds.zip
    And if i run the macro again, the code should overwritten the zip files according to the new files or folders inside folder Fruit


    What i need now, is that in case any of the zip files exceeds 28 Mb to make volumes like:

    apple.zip - Part 1 28Mb
    apple.zip - Part 2 28Mb
    apple.zip - Part 3 1Mb
    grapes.zip 12Mb (if zip wont exceed 28Mb, no need to add to the name "Part 1" )
    almonds.zip - Part 1 28Mb
    almonds.zip - Part 2 5Mb

    Something like that.

    I cannot install any software to zip, only the windows default zip software.

    Please Login or Register  to view this content.


    Can someone help adding to this code the functionality to divide the zips into volumes that won't exceed 28 Mb and rename zips accordingly (Part 1, Part 2 ...)

    Thanks

  2. #2
    Forum Contributor Gregor y's Avatar
    Join Date
    10-24-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2010 32-Bit
    Posts
    276

    Re: VBA do divide zip into volumes that won exceed 28 Mb and adds "Part 1" "2" to the name

    Windows' default functionality does not provide the, "split file by x bytes feature" that you'll find in 3rd party portable-executables like 7zip.

    So if any single compressed apple file is over the limit you wouldn't be able to make a .zip under the limit using the native tool set.
    If it'd make you feel better using my answer because of my street cred, then you can go ahead and click Add Reputation below to improve it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 11-19-2020, 08:30 PM
  2. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  3. Replies: 2
    Last Post: 07-24-2017, 02:19 AM
  4. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  5. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  6. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  7. Replies: 2
    Last Post: 06-25-2013, 12:43 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1