I have lots of files under dir1/ in the server. I want to copy all the png files under dir1/*.png to google drive.
However
rclone copy dir1/*.png gdrive:dir2/
gives error.
Usage:
rclone copy source:path dest:path [flags]
Flags:
--create-empty-src-dirs Create empty source dirs on destination after copy
-h, --help help for copy
Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.
Command copy needs 2 arguments maximum: you provided 66 non flag arguments:
Is there a way to solve this issue?
Ok, I have found a way to resolve this issue in another way around.
I used the
--exclude
flag.In this way, I exclude the
directory_I_do_not_want_to_copy_under_dir1
and all of its contents.Therefore I copied the remaining under
dir1/
including*.png
files.Not perfect but an approximate solution :)