Skip to content

A Node.js CLI tool that seamlessly connects zip files between Windows and macOS, enabling cross-platform compatibility and efficient file handling.

License

Notifications You must be signed in to change notification settings

opengiver/bridge-zip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bridge-Zip

npm npm npm bundle size license

Bridge-Zip is a command-line utility designed to solve compatibility issues between ZIP files created on Windows and macOS systems. It provides seamless conversion of folder names and structures to ensure proper functionality across both operating systems.



The Problem

When creating ZIP archives on different operating systems, folder structures and encoding issues can arise:

  • ZIP files created on Windows may have folder names encoded in a way that's unreadable on macOS
  • ZIP files created on macOS might have folder names that appear incorrectly on Windows
  • Extracting cross-platform ZIP files often results in garbled or unreadable folder names

Bridge-Zip solves these issues by providing an easy way to check and convert folder names within ZIP archives.

Installation

# Install globally
npm install -g bridge-zip

# Or use with npx
npx bridge-zip <command>

Usage

Bridge-Zip offers two main commands:

Check ZIP Contents

Examine the folder names inside a ZIP file:

bridge-zip check example.zip

This will display all folder and file names contained within the archive.

Convert ZIP File

Extract a ZIP file, rename its main folder, and recompress it:

bridge-zip convert example.zip newFolderName

This command:

  1. Extracts the ZIP file
  2. Renames the main folder to the specified name
  3. Recompresses the folder into a new ZIP file

Examples

Checking a Windows-created ZIP file on macOS:

bridge-zip check windows_archive.zip
# Output: Folder names inside the zip: ["Project_Files/", "Project_Files/document.docx", ...]

Converting a ZIP file for cross-platform compatibility:

bridge-zip convert macos_archive.zip ProjectFiles
# Output: Conversion complete: /path/to/macos_archive.zip

Technical Details

Bridge-Zip uses:

  • Node.js for cross-platform compatibility
  • adm-zip for ZIP file manipulation
  • Commander.js for the command-line interface

License

MIT

Author

Byungsker

About

A Node.js CLI tool that seamlessly connects zip files between Windows and macOS, enabling cross-platform compatibility and efficient file handling.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published