gauravnumber/move.zig
π οΈ A Zig-based mv alternative with automatic conflict resolution β adds numeric suffixes when files already exist. Fast, lightweight, and cross-platf...
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.
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 directoryWhen a naming conflict occurs, move automatically:
_1, _2, etc.Zig provides:
MIT