update
This commit is contained in:
12
tvshow_remove_empty
Executable file
12
tvshow_remove_empty
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Find and remove empty directories
|
||||
#
|
||||
|
||||
# Find and process empty directories
|
||||
TARGET_DIR="$DS918_DIR/video/#tvshow"
|
||||
cd "$TARGET_DIR"
|
||||
find . -maxdepth 1 -type d -empty -print0 | while IFS= read -r -d '' dir; do
|
||||
echo "$dir to be removed"
|
||||
rm -r "$dir" || echo "Failed to remove $dir"
|
||||
done
|
||||
Reference in New Issue
Block a user