Add file rename UUID script.

This commit is contained in:
inference 2022-10-01 01:33:41 +01:00
parent b3569dad56
commit dac1089127

16
file-rename-uuid.sh Normal file
View 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