Can Rclone move folder that is 30 days old

I am wanting to Rclone check the age of the Folder not the file and move folder and contents using something like this "if find $FROM* -type f -mmin +15 | read"

Could I use -type d -dmin +30?

Below is the script I am using or an example. What I want Rclone to do is check the folder for the age of 30 days and move the folder with the files in it.

I have looked in all the info on Rclone and could not find anything on what I want it to do. The reason why I want it to check the folder for being 30 days is because the files are actually older and part of that script checks the file.

#!/bin/bash
# RCLONE UPLOAD CRON TAB SCRIPT
# Type crontab -e and add line below (without # )
# * * * * * root /home/scripts/upload-tv.cron >/dev/null 2>&1

if pidof -o %PPID -x "upload-tv.cron"; then
exit 1
fi

LOGFILE="/home/scripts/logs/upload-tv.cron.log"
FROM="/home/plex/tv-r/"
TO="tv-gd:/"

# CHECK FOR FILES IN FROM FOLDER THAT ARE OLDER THEN 15 MINUTES
if find $FROM* -type f -mmin +15 | read
then
echo "$(date "+%d.%m.%Y %T") RCLONE UPLOAD STARTED" | tee -a $LOGFILE
# MOVE FILES OLDER THEN 15 MINUTES
rclone move $FROM $TO -c --no-traverse --transfers=300 --checkers=300 --delete-after --min-age 15m --log-file=$LOGFILE
echo "$(date "+%d.%m.%Y %T") RCLONE UPLOAD ENDED" | tee -a $LOGFILE
fi
exit

I found it.

-type d –ctime +5

I did this to check it

find . -type d -ctime +5 -print

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.