# move A **Zig-based utility** that enhances file and directory moving capabilities with **smart conflict resolution**. Unlike the standard `mv` command, `move` automatically handles naming conflicts by appending indices to filenames or directory names. ## Features * πŸš€ Zero runtime dependencies * ⚑ Compiled and blazing fast * πŸ”„ Smart conflict resolution * πŸ“ Supports both files and directories * πŸ”’ Handles multiple sources * πŸ› οΈ Written in Zig ## Installation ### 🧱 Build from Source #### For Android (32-bit ARM) ```bash zig build-exe move.zig -target arm-linux-androideabi -femit-bin=move ``` This will output a binary named `move` that runs on 32-bit Android systems (e.g., Termux). #### For Windows ```bash zig build-exe move.zig ``` This builds a `move.exe` file for Windows (native architecture). #### Optional: Move to Global Path After building, you can move the binary to a directory in your system’s `PATH`: ```bash mv move /usr/local/bin/ # For Linux/Android move move.exe C:\Windows\System32 # For Windows (requires admin) ``` ## Usage ```bash # Basic usage move # Move multiple files to a directory move ... ``` ## Examples ### 1. Moving a Single File Initial structure: ``` . β”œβ”€β”€ 1.txt β”œβ”€β”€ 2.txt β”œβ”€β”€ 3.txt β”œβ”€β”€ 4.txt β”œβ”€β”€ 5.txt └── 6.txt ``` Command: ```bash move 1.txt 2.txt ``` Result: ``` . β”œβ”€β”€ 2.txt β”œβ”€β”€ 2_1.txt # 1.txt was moved and renamed to avoid conflict β”œβ”€β”€ 3.txt β”œβ”€β”€ 4.txt β”œβ”€β”€ 5.txt └── 6.txt ``` ### 2. Moving Multiple Files Command: ```bash move 1.txt 2.txt 3.txt destination_folder/ ``` ### 3. Moving Directories Command: ```bash move source_directory/ destination_directory/ ``` ## Supported Operations * `move fileA fileB` – Move and rename fileA to fileB with conflict resolution * `move file1 file2 file3 targetDir` – Move multiple files into a directory * `move dir1 dir2/` – Move a directory into another directory ## How It Works When a naming conflict occurs, `move` automatically: 1. Detects if the destination path already exists 2. Appends an incremental index suffix like `_1`, `_2`, etc. 3. Moves the file or directory safely without overwriting existing content ## Why Zig? Zig provides: * ⚑ Native performance * 🧩 Minimal binary size * 🧠 Simple, predictable behavior * 🌐 Cross-compilation built-in ## License MIT