How to move all root files a directory

I wants to move all files from shared-drive: to shared-drive:folder

Tried many things, but alawys end up with overlapping erros. :confused:

Which command did you try?
Like rclone move shared-drive:/ shared-drive:/Folder ?

I tried

rclone move shared-drive: shared-drive:folder1 --exclude=folder1/** -vvn

Have you tried --include /*?

Failed to move: can't sync or move files on overlapping remotes

Ok.. A copy followed by delete would perhaps achieve what you want while avoiding this error, but I understand it would be better to get a single move to do it all..

@Animosity022 @asdffdsa any thoughts?

I was just refreshing my brain on this one.

If I recall, you can't use filtering as that happens after the check so moves and such won't work well.

I'd probably mount it and do the move on the mount or if it's a few things, I'd move via the WebGUI.

I think another one would be to generate individual commands to spit out what to move other than trying to 'glob' it. So you could list out the directories and move them command by command as well.

1 Like

will server side move work?

The mount should do things server side when possible. I'd test with something small to validate.

hi,

i was going to suggest the same thing as @Animosity022.

  • rclone mount, which should do server side.
  • i have read other rcloners use the web gui.

Thank you both for your quick responses, really appricate it. :slight_smile:

I don't mind using Mount method, but really there is'nt a simple method? Can't believe it. :anguished:

Maybe @ncw have something in his sleeve. :face_with_thermometer:

perhaps use

  1. rlcone lsf to a text file.
  2. edit the file to remove folder
  3. use rclone move on that edited file.
1 Like

did not understand this one. any example?

windows or linux?

i have both (WSL), so whatever you prefer.

Never mind. I ended up learning drive-sdk-php and built a script to do the job. :slight_smile:

on linux, we want to move all files into thedestfolder.

here is the folder structure.

rclone lsd b201:
          -1 2021-03-18 16:48:16        -1 thedestfolder
          -1 2021-03-18 16:48:16        -1 thesourcefolder01
          -1 2021-03-18 16:48:16        -1 thesourcefolder02

here are the files

 rclone ls b201:
        1 thedestfolder/dest01.txt
        1 thedestfolder/dest02.txt
        3 thesourcefolder01/01.txt
        3 thesourcefolder02/02.txt

create a list the files we want to move
rclone lsf b201: --format=p --files-only --recursive --exclude=/thedestfolder/** > list.txt

here what the list.txt looks like

thesourcefolder02/02.txt
thesourcefolder01/01.txt

now we move those files.

for f in `cat list.txt`
do 
	rclone moveto b201:$f b201:thedestfolder/$f -vv
done

and here the list of files after that.

rclone ls b201:
thedestfolder/dest01.txt
thedestfolder/dest02.txt
thedestfolder/thesourcefolder01/01.txt
thedestfolder/thesourcefolder02/02.txt

this does work with server-side move, really a server-side copy and then a server-side delete

INFO  : 01.txt: Copied (server-side copy)
INFO  : 01.txt: Deleted
1 Like

here is an improved version, that moves folders.

rclone lsf b201: --format=p --dirs-only --recursive --exclude=/thedestfolder/** > list.txt

for f in `cat list.txt`
do 
	rclone move  b201:$f b201:thedestfolder/$f
done
1 Like

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