Say I have a couple of files I wish to move to the files folder on the remote. rclone move *.mkv <remote>:files doesn't work because it expects only one item (why?).
Workaround: create a new folder, move the files there, then move the folder to the remote.
In that case, the files are only moved from the folder to the remote, not the actual folder (which should be moved too, IMO).
A command like this, where I want to move a folder to the root of the remote should be:
Can you give an example of what you mean by using a few files?
If you wanted to move 2 files into a remote, you'd just include the path to them.
felix@gemini:~/test$ ls
one two
rclone move /home/felix/test GD:
felix@gemini:~/test$ rclone lsf GD:
one
two
or are you trying to do
felix@gemini:~/test$ cd
felix@gemini:~$ pwd
/home/felix
felix@gemini:~$ rclone move /home/felix/test GD:test
felix@gemini:~$ cd test
felix@gemini:~/test$ ls
felix@gemini:~/test$ cd ..
felix@gemini:~$ rclone ls GD:test
248 two
248 one
You can use either of these to clean up either way too:
--create-empty-src-dirs Create empty source dirs on destination after move
--delete-empty-src-dirs Delete empty source dirs after move
I want to move 2 files from my home folder, not everything in my home folder.
This was the error I received:
agneev@do1:~$ rclone move *.mkv media:drop --dry-run
Usage:
rclone move source:path dest:path [flags]
Flags:
--create-empty-src-dirs Create empty source dirs on destination after move
--delete-empty-src-dirs Delete empty source dirs after move
-h, --help help for move
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 move needs 2 arguments maximum: you provided 5 non flag arguments: ["jellyfish-25-mbps-hd-h264.mkv" "jellyfish-40-mbps-hd-hevc-10bit.mkv" "jellyfish-50-mbps-hd-h264.mkv" "jellyfish-50-mbps-hd-hevc.mkv" "media:drop"]
I'm not sure I can explain it any better.
If I use mv ~/folder1 /mnt/<rclone_mount>, the folder and all contents beneath it are moved.
whereas using rclone move ~/folder1 <remote>: moves the contents of folder1 but not folder1 itself. It should behave similar to mv right?
I will take you up on that. I want to move all folders under, say, media:drop such that there's no leftovers; everything's moved over.
Even better, a way to find all files ending with mkv under the subfolders of drop and move them (and possibly delete the folders from which the mkv files are being moved?? I know its a stretch and its perfectly fine if that can't be done).
So that says move everything in all folders, but those items and folders I exclude. When it is done, it deletes any empty src folders not in the exclude so Movies/TV in my example.
I'm an old school unix kind of guy so /opt is a bit legacy but more for when people installed add applications to a server, we used that location. It's stuck with me over the years so my /opt is all my installed applications on my Linux box.
No, once you setup permissions, everything should work fine. My setup is my own non shared server so I basically run everything as a single non root user.
felix@gemini:/$ ls -al | grep opt
drwxrwxr-x 38 felix felix 4096 Mar 10 05:41 opt
felix is the user and runs everything on my server.
There are a million ways to do things and usually just do whatever works best for your brain as this works well for my use case and setup. My setup would not work well for a seed box or something shared
The ** adds in the / so it grabs any directories down as well.
Use ** to match anything, including slashes (/).
https://rclone.org/filtering/#patterns does a pretty good job. If you have anything to help make things more helpful, we can always make updates to make it better.
I always do my filter testing with just a rclone ls command to validate it does what I want and --dry-run it and finally let it fly after those both first work.
It's usually a bit of trial and error depending on how complex the use case is as I never get it right the first time
This is confusing then. If the folders aren't empty how would the move delete them? You'd either have to run rclone delete and then rclone rmdirs or you'd need to just run rclone purge and the entire path will be removed. Thats how it works as of now. I'd argue that it would be nice to have a flag to leave the root directory (maybe an enhancement) or to have a flag to have rclone delete also remove the directories in one go (which is probably better actually).