Dateien nach "/" hochladen

This commit is contained in:
2025-12-11 14:49:13 +01:00
parent 15214e37ea
commit 03b7794d30
5 changed files with 226 additions and 0 deletions

41
porordF.sh Normal file
View File

@@ -0,0 +1,41 @@
#!/bin/sh
# usr/syno/bin
# Link erstellen ln -s /volume1/Backup/NAS_Scripte/porord.sh /usr/syno/bin/porord.sh
# >>/volume1/Backup/NAS_Scripte/LOG/$LOGFILE
# Logfile
NOW=`date +'%d.%m.%Y'`
LOGFILE="log-$NOW.log"
# Entpackt und l<>scht rar,s nach erfolgreichen entpacken.
# for RAR in `find /volume1/Filesharing/!!X!/ \( -iname "*.rar" \) -type f` ; do cd `dirname $RAR`; unrar x -kb -o- '$RAR' && rm *.r?? ; done
#for RAR in `find /volume1/Filesharing/!!X!/ \( -iname "*.rar" \) -type f \( ! -regex '/volume1/System/#recycle/.*' \)` ; do cd `dirname $RAR`; unrar x -kb -o- '$RAR' && rm *.r?? ; done >>/volume1/Backup/NAS_Scripte/LOG/$LOGFILE
# L<>scht auch rar,s die noch so umherfliegen ohne oben gel<65>scht zu werden (weil schon vorhandene film datei).
# find /volume1/System/ \( -iname "*.r??" \) -type f \( ! -regex '/volume1/Filesharing/#recycle/.*' \) -delete
# Verschiebt alles in Por Root
find /volume1/Filesharing/!!X!/* \( -iname "*.mov" -o -iname "*.avi" -o -iname "*.mkv" -o -iname "*.wmv" -o -iname "*.iso" -o -iname "*.mp4" -o -iname "*.img" -o -iname "*.asf" -o -iname "*.mpg" -o -iname "*.mpeg" -o -iname "*.m4v" -o -iname "*.vob" -o -iname "*.flv" \) -type f -exec mv {} /volume1/Filesharing/!!X!/ \;
# L<>scht samples aus dem root.
find /volume1/Filesharing/!!X!/ -iname "*sample*" -exec rm -r "{}" \;
#L<>scht alle ordner ohne inhalt
# find "/volume1/Filesharing/!!X!/*" -type d -size -3100k -exec echo rm -rf "{}" \;