Giter VIP home page Giter VIP logo

fix-onedrive-zip's Introduction

Fix-OneDrive-Zip

Linux build Macos build Windows build

This program fixes an issue with Zip files larger than 4 Gig created by OneDrive and also the Windows 10 right-click action Send-To/Compressed (zip) folder. At the time of writing these Zip files cannot be unzipped using some of the well-know Zip archivers.

For a really detailed summary of the issue, see Does Microsoft OneDrive export large ZIP files that are corrupt?.

This program automates the manual process described in the referenced page.

Notes

  1. This program will modify your Zip file, so it is good practice to take a backup copy of the original file just in case.

  2. You need a 64-bit build of perl to run this program.

Usage

perl fix-onedrive-zip [--dry-run] file1.zip [file2.zip...]

The --dry-run option will simulate running of the program without making any changes to the Zip file.

Technical Details

If you want to understand more about the internal structuire of Zip files, the primary reference is APPNOTE.TXT.

The issue with the OneNote/Windows Zip files larger than 4 Gig is they have an invalid Total Number of Disks field in the ZIP64 End Central Directory Locator record (see APPNOTE.TXT version 6.3.9, section 4.3.15). The value in this field should be 1, but OneDrive/Windows sets it to 0.

This program simply changes the Total Number of Disks field value to 1 if it finds it set to 0 in the Zip file.

Support

https://github.com/pmqs/Fix-OneDrive-Zip/issues

Copyright

Copyright (c) 2020-2022 Paul Marquess ([email protected]). All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.