diff options
| author | yuzu-eva <cafebabe@disroot.org> | 2025-05-08 14:01:37 +0200 |
|---|---|---|
| committer | yuzu-eva <cafebabe@disroot.org> | 2025-05-08 14:01:37 +0200 |
| commit | ef7c1605a027b52bbff1b01ea693b60f53fa3a71 (patch) | |
| tree | 1089334258aefbd459d18cf6968e78f1194739b0 /bulk-rename-from-file | |
initial commit
Diffstat (limited to 'bulk-rename-from-file')
| -rwxr-xr-x | bulk-rename-from-file | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bulk-rename-from-file b/bulk-rename-from-file new file mode 100755 index 0000000..8626580 --- /dev/null +++ b/bulk-rename-from-file @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Rename a whole directory of files to strings listed in a text file. + +j=1 + +for i in *; do + mv "$i" "$(sed -n "$j"p ../fileNames.txt)"; + j=$((j=j+1)); +done |
