Move media files (such as *.mkv, *.avi, etc) to his parent folder

What is the problem you are having with rclone?

I want to do what this man asked before:
Is there a simple solution to move all files from subfolders to the folder above? Would like to have all movies in one folder…

So move all files, with .bin extension, into the folder above it
Plex/Movies/MovieA (Year)/MovieA (Year).mkv.bin
Plex/Movies/MovieA (Year).mkv.bin

What is your rclone version (output from rclone version)

latest version

Which OS you are using and how many bits (eg Windows 7, 64 bit)

synology nas

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 DIDN'T TRIED YET because I need the command sintax)

hello and welcome to the forum,

i am not a linux expert....

without more details, a command such as this could work.
rclone lsf "/Plex/Movies" --files-only --recursive --absolute --include="*.{avi,bin,mkv}" | xargs -I file rclone moveto "file" "/Plex/Movies" -vv --dry-run

Hello and thanks for the welcoming.
I apreciate your fast response. But I see I should have specify more details. I explain myself:
Your command seems awesome, but it only works for an "absolute path". I know that my sentence is not as complete as now I see it should have been, because what I was looking for was a "relative path" solution so that the files could move to their parent folder, existing many diferent locations (so the parent folder will be different in many many cases).
I'll put an image to visualize what I need:
The idea is to extract the films from its folder (in the image case: the film file *.mkv from "Underworld (2003)" folder) and move it into the its parent folder (in the image case: "U" folder), and so on for all films (located on hundreds of diferent locations in diferent levels of the file system folder hierarchy).

I'm sorry to have not specifyed like this before.

Is it possible?

Thanks again for your support!!

I normally do complex file renaming with an rclone mount and a shell script...

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