Add file rename UUID script.
This commit is contained in:
parent
b3569dad56
commit
dac1089127
16
file-rename-uuid.sh
Normal file
16
file-rename-uuid.sh
Normal file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright 2022 Inference
|
||||
|
||||
# 0.0.0.0
|
||||
|
||||
|
||||
# Rename all files in current directory to UUIDs.
|
||||
for FILE in *
|
||||
do
|
||||
if [ -f "$FILE" ];then
|
||||
ID=`uuidgen`
|
||||
EXTENSION=${FILE#*.}
|
||||
mv -v "$FILE" "$ID"."$EXTENSION"
|
||||
fi
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user