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.
- π Zero runtime dependencies
- β‘ Compiled and blazing fast
- π Smart conflict resolution
- π Supports both files and directories
- π’ Handles multiple sources
- π οΈ Written in Zig
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).
zig build-exe move.zig
This builds a move.exe
file for Windows (native architecture).
After building, you can move the binary to a directory in your systemβs PATH
:
mv move /usr/local/bin/ # For Linux/Android
move move.exe C:\Windows\System32 # For Windows (requires admin)
# Basic usage
move <source_path> <destination_path>
# Move multiple files to a directory
move <file1> <file2> ... <target_directory>
Initial structure:
.
βββ 1.txt
βββ 2.txt
βββ 3.txt
βββ 4.txt
βββ 5.txt
βββ 6.txt
Command:
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
Command:
move 1.txt 2.txt 3.txt destination_folder/
Command:
move source_directory/ destination_directory/
move fileA fileB
β Move and rename fileA to fileB with conflict resolutionmove file1 file2 file3 targetDir
β Move multiple files into a directorymove dir1 dir2/
β Move a directory into another directory
When a naming conflict occurs, move
automatically:
- Detects if the destination path already exists
- Appends an incremental index suffix like
_1
,_2
, etc. - Moves the file or directory safely without overwriting existing content
Zig provides:
- β‘ Native performance
- π§© Minimal binary size
- π§ Simple, predictable behavior
- π Cross-compilation built-in
MIT