Rclone move with excluded directories?

What is the problem you are having with rclone?

I am trying to move multiple folders from a folder with many subfolders by "move". You should not "move" to subfolders that contain files with "-missing" at the end.

There is a folder "root", here are several subfolders in it, e.g. log1 / log2 / log3 / log4
In this folder there are txt files, for example: log1.txt, log2.txt,... but also log1.txt-missing

Now only folders that do not contain files with "-missing" should be moved by "move".

/root/log1/log1.txt, log2.txt, log3.txt <<< this folder should be moved.
/root/log2/log1.txt-missing, log2.txt, log3.txt <<< this folder should be excluded

At the end dir log1 should end up in gcrypt, but dir log2 should not.

I hope that the explanation is understandable.
Thanks for your answers.

What is your rclone version (output from rclone version)

rclone v1.52.3

  • os/arch: linux/amd64
  • go version: go1.14.7

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Debian 10 Buster

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone -P move --config="/home/rclone.conf" --drive-stop-on-upload-limit --delete-empty-src-dirs --exclude-if-present "-missing" /backup/ gcrypt:/backup

The rclone config contents with secrets removed.

type = drive
client_id = ***
client_secret = ***
scope = drive
token = {"access_token":"***","expiry":"***"}

type = crypt
remote = gdrive:/
filename_encryption = standard
directory_name_encryption = true
password = ***
password2 = ***

Hey jabalu, welcome to the forum!
I'm not that versed with this usage requirement, but I think what you'd want to do is to use --exclude-if-present "*-missing"
At least, that is what I would try :slight_smile:

I think that would need to be a specific file name so -exclude-if-present "is-missing" but that would work.

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