I want to exclude all files in a directory, but include all sub-directories and sub-directory files. Let me present an example.
I have a directory named dir with two files (file1 & file2), and one subdirectory named subdir. The subdir directory contains one file named file3.
dir
|-- file1
|-- file2
|-- subdir
+-- file3
I want to exclude all files in the dir directory (file1, file2, etc.), while including all sub-directories, and all files in the sub-directories of dir (subdir/file3).
Run the command 'rclone version' and share the full output of the command.
rclone v1.50.2
os/arch: linux/amd64
go version: go1.13.8
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)
I was able to get both solutions to work, I just had to go up one directory higher and run things from the home directory, instead of the /test directory
felix@gemini:~$ rclone ls /home/felix/test
0 file1
0 file2
0 subdir/file3
felix@gemini:~$ rclone ls /home/felix/test --filter '+ subdir/**' --filter '- **'
0 subdir/file3
felix@gemini:~$ rclone ls /home/felix/test --exclude '/dir/*'
0 subdir/file3