initial commit of new version
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Navigate to the img directory
|
||||
cd img || exit
|
||||
|
||||
# Loop through each folder in the img directory
|
||||
for folder in IMG_*; do
|
||||
# Check if the folder exists and is a directory
|
||||
if [ -d "$folder" ]; then
|
||||
# Navigate into the folder
|
||||
cd "$folder" || continue
|
||||
|
||||
for file in *; do
|
||||
if [[ -f "$file" ]] && ! [[ "$file" =~ ^IMG_[0-9]{4}\.jpeg$ ]]; then
|
||||
rm "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
# Navigate back to the img directory
|
||||
cd ..
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user