Skip to main content

mac2win-zip

Python Version License Platform Code Style Package Manager

Create Windows-compatible ZIP files from macOS

"Where's my files after I zip on Mac and open it in Windows?" Garbled Korean filenames and missing characters? You're not alone. This tool fixes it.

macOS (ZIP created) Windows (ZIP opened)
📄 Hello?.pdf ❌ (removed)
📄 안녕하세요 세상.pdf ❌ (removed)

​ ⬇️ Use mac2win-zip ⬇️

macOS (ZIP created) Windows (ZIP opened)
📄 Hello.pdf ✅ Hello.pdf
📄 안녕하세요 세상.pdf ✅ 안녕하세요 세상.pdf

With mac2win-zip, your filenames stay intact when opening on Windows! macOS에서 생성한 ZIP 파일을 Windows에서 열어도 파일명이 깨지지 않습니다.

Why mac2win-zip?

The Problem

macOS uses NFD (Normalization Form Decomposed) for Unicode filenames, while Windows uses NFC (Normalization Form Composed). When you create a ZIP file on macOS containing files with Unicode characters (like Korean, Japanese, or special characters), Windows users often see garbled filenames.

Additionally, macOS allows certain characters in filenames (like : or |) that are forbidden on Windows.

The Solution

mac2win-zip automatically:

  1. Normalizes all filenames from NFD to NFC
  2. Removes or replaces Windows-forbidden characters
  3. Excludes macOS-specific files (.DS_Store, etc.)
  4. Preserves the folder structure

Result: ZIP files that work perfectly on both macOS and Windows!

Installation

# Clone the repository
git clone https://github.com/Wordbe/mac2win-zip.git
cd mac2win-zip

# Install globally
uv tool install .

Now you can use mac2win-zip from anywhere!

Quick Start

# Zip current directory (creates current-folder-name.zip)
mac2win-zip

# Zip a specific folder (creates my-folder.zip)
mac2win-zip my-folder

# Zip multiple files (creates archive.zip by default)
mac2win-zip file1.pdf file2.jpg

# Custom output name with -o option
mac2win-zip my-folder -o backup.zip

Usage Examples

Basic Usage

# Zip everything in current directory (creates folder-name.zip)
mac2win-zip

# Zip a folder (automatically includes all subdirectories, creates folder1.zip)
mac2win-zip folder1

# Zip specific files (creates archive.zip)
mac2win-zip report.pdf presentation.pptx

Advanced Usage

# Custom output name with -o option
mac2win-zip folder1 -o backup.zip

# Zip multiple folders and files together
mac2win-zip folder1 folder2 notes.txt -o backup-2024.zip

# Custom output location
mac2win-zip ~/Downloads -o ~/Desktop/downloads-backup.zip

Help

mac2win-zip --help

Features

  • Unicode Normalization: Converts macOS NFD filenames to Windows-compatible NFC
  • Character Sanitization: Removes Windows-forbidden characters (<>:"|?*\)
  • Auto Recursive: Automatically includes all subdirectories when zipping folders
  • Smart Naming: Creates folder-name.zip by default (no -o needed for single folder)
  • Structure Preservation: Maintains original folder hierarchy in ZIP
  • Smart Filtering: Excludes hidden files (.DS_Store, etc.)
  • Korean Support: Perfect handling of Korean and other Unicode filenames
  • Simple CLI: Intuitive command-line interface

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Bug Reports

If you discover any bugs, please create an issue on GitHub with:

  • Your operating system and version
  • Python version
  • Steps to reproduce the bug
  • Expected vs actual behavior

Show Your Support

If this project helped you, please give it a star!


How It Works

Installation Process

When you run uv tool install ., here's what happens:

  1. Creates isolated environment: uv creates a dedicated virtual environment at ~/.local/share/uv/tools/mac2win-zip/
  2. Installs dependencies: All required packages (pytest, black, ruff, etc.) are installed in this isolated environment
  3. Creates executable: A wrapper script is generated that calls your Python code
  4. Symlinks to PATH: A symbolic link is created at ~/.local/bin/mac2win-zip pointing to the executable
  5. Ready to use: Since ~/.local/bin is in your PATH, you can now run mac2win-zip from anywhere

File Locations

~/.local/share/uv/tools/mac2win-zip/  # Isolated environment with all dependencies
~/.local/bin/mac2win-zip              # Executable symlink (in your PATH)

The Wrapper Script

The generated executable at ~/.local/bin/mac2win-zip is a simple Python script:

#!/path/to/python
import sys
from mac2win_zip.cli import main
sys.exit(main())

This is defined in pyproject.toml:

[project.scripts]
mac2win-zip = "mac2win_zip.cli:main"

Benefits

  • Isolation: Each tool has its own environment, no conflicts with other Python packages
  • System-wide access: Works from any directory
  • Clean uninstall: Easy to remove without leaving traces

Uninstall

To remove the tool completely:

uv tool uninstall mac2win-zip

This removes both the isolated environment and the executable symlink.


Made with ❤️ by Wordbe for seamless macOS-Windows file sharing

Metadata

Release files for mac2win-zip 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mac2win-zip 1.0.1
File Size Uploaded Provenance
mac2win_zip-1.0.1.tar.gz 62.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mac2win-zip 1.0.1
File Interpreter ABI Platform
mac2win_zip-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 71.0 kB

Release files / mac2win_zip-1.0.1.tar.gz

Download URL mac2win_zip-1.0.1.tar.gz
Size 62.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e95483b09826666e33c74990fda5e7e6a7b53427b49f150cdef4760479a3b358
BLAKE2b-256 checksum
How to use checksums
f3b67c16ace1ebf9856cb9b31588a60e95e8d244648114832706832bf00834d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.3

Release files / mac2win_zip-1.0.1-py3-none-any.whl

Download URL mac2win_zip-1.0.1-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54824e451149bf530f8978f7a74db499b5a55f913b33d8efc59e75af6e15e3b5
BLAKE2b-256 checksum
How to use checksums
f3f65fa25811bb47735240b23b0b2277ef25b545b1568bfc07349ce903312660
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.3

Security for mac2win-zip 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page