Move first number of files

If i wanted to move the first 500 files i'd do

mv `ls | head -500` ./subfolder1/

can i do this via rclone somehow?

Sure, use rclone -R lsf --files-only source: | head -500 > files to generate the list then rclone move -P --files-from files source: dest:

1 Like

oh i'd only be doing this on the remote. i'm not moving from local to remote.

rclone -R lsf --files-only remote:dir1 remote:dir1/dir\ 2 | head -500 > files

since dir 2 has a space?

i mean

rclone -R lsf --files-only remote:dir1 | head -500 > files 
rclone move -P --files-from files remote:dir1 remote:dir\ 2

or just wrap with quote?

rclone move -P --files-from files "remote:dir1" "remote:dir 2"

2019/08/23 08:43:55 Fatal error: unknown shorthand flag: 'R' in -R

quotes is reccommended

Put the -R after the lsf it isn't a global flag (my mistake!), so rclone lsf -R --files-only ...

1 Like

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