Best way to move individual folders into alphabetized folders

After living with agonizingly slow Plex scans for years now, I've decided to finally move all my individual movie folders into folders named # - Z.

My current structure is \Movies"name of movie (year)""name.of.movie.year.mkv". Trying to figure out the best/fastest way to move the "name of movie (year)" folders into the appropriate # - Z folders, one letter at a time. Doing this manually in Windows Explorer takes forever (roughly 15 seconds per folder). This is probably due to the extremely large size of the "Movies" folder, which contains almost 11,000 folders. Strangely enough, moving things into the "Movies" folder is much faster.

My mount command for read-write is simple: rclone mount --allow-other -v
Should I add anything to speed things up for this particular scenario? Or, should I try to accomplish this outside of a mount, via rclone move command? Will this be faster, and if so, what command should I use to move, for example, all folders starting with "a" to the folder called "A"?

You can do this with rclone move... Your source and your destination directories mustn't overlap otherwise rclone will complain.

Here is an example with the local filesystem - hopefully that will give you the idea!

$ tree unsorted/
unsorted/
ā”œā”€ā”€ pie
ā””ā”€ā”€ potato

0 directories, 2 files
$ tree sorted
sorted

0 directories, 0 files

$ rclone move -v --include "/p*" unsorted sorted/p
2019/09/10 22:11:37 INFO  : Local file system at /tmp/sorted/p: Waiting for checks to finish
2019/09/10 22:11:37 INFO  : Local file system at /tmp/sorted/p: Waiting for transfers to finish
2019/09/10 22:11:37 INFO  : potato: Moved (server side)
2019/09/10 22:11:37 INFO  : pie: Moved (server side)
2019/09/10 22:11:37 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 0
Checks:                 2 / 2, 100%
Transferred:            0 / 0, -
Elapsed time:          0s

$ tree unsorted/
unsorted/

0 directories, 0 files
$ tree sorted
sorted
ā””ā”€ā”€ p
    ā”œā”€ā”€ pie
    ā””ā”€ā”€ potato

1 directory, 2 files

Nick, thanks for your quick reply. So, I just tried the following:

rclone move -v --include "/q*" Google_Drive_Crypt:Videos/Misc/Movies Google_Drive_Crypt:Videos/Misc/Temp/UPLOADS/Q

Was expecting it to move all folders starting with Q, but it didn't move anything. Am I missing something?

What I wrote above was for files... use --include "/q**" if you want directories (and all of their contents) starting with q.

Hmmm, tried it with **, but still nothing:

rclone move -v --include "/q**" Google_Drive_Crypt:Videos/Misc/Movies Google_Drive_Crypt:Videos/Misc/Temp/UPLOADS/Q
2019/09/10 14:51:01 INFO : Encrypted drive 'Google_Drive_Crypt:Videos/Misc/Temp/UPLOADS/Q': Waiting for checks to finish
2019/09/10 14:51:01 INFO : Encrypted drive 'Google_Drive_Crypt:Videos/Misc/Temp/UPLOADS/Q': Waiting for transfers to finish
2019/09/10 14:51:01 INFO :
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors: 0
Checks: 0 / 0, -
Transferred: 0 / 0, -
Elapsed time: 0s

Is there a reason not to just do the moves on the mount? I find that easier to interact with.

Oh, it's much easier to interact with, but like I wrote above, it's incredibly slow due to the amount of folders in the Movies folder. Takes about 15-20 seconds for one folder to move.

I tried it locally - it seemed to work...

$ tree sorted unsorted
sorted
unsorted
ā”œā”€ā”€ p_dir
ā”‚   ā””ā”€ā”€ p_file
ā””ā”€ā”€ p_dir2
    ā””ā”€ā”€ p_file2

2 directories, 2 files

$ rclone move -v --include "/p**" unsorted sorted/p
2019/09/10 22:55:33 INFO  : p_dir2/p_file2: Moved (server side)
2019/09/10 22:55:33 INFO  : p_dir/p_file: Moved (server side)
2019/09/10 22:55:33 INFO  : Local file system at /tmp/sorted/p: Waiting for checks to finish
2019/09/10 22:55:33 INFO  : Local file system at /tmp/sorted/p: Waiting for transfers to finish
2019/09/10 22:55:33 INFO  : 
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 0
Checks:                 2 / 2, 100%
Transferred:            0 / 0, -
Elapsed time:          0s

$ tree sorted unsorted
sorted
ā””ā”€ā”€ p
    ā”œā”€ā”€ p_dir
    ā”‚   ā””ā”€ā”€ p_file
    ā””ā”€ā”€ p_dir2
        ā””ā”€ā”€ p_file2
unsorted
ā”œā”€ā”€ p_dir
ā””ā”€ā”€ p_dir2

5 directories, 2 files

Remember google drive is case sensitive so you are selecting directories starting with lowercase q only. If you want both cases then use --include "/[qQ]**"

Oh Windows :frowning:

Need a real OS :slight_smile:

Spot on! Changed to "Q**" and it worked. Took 49 seconds for 25 folders. Not exactly a world record, but much better than with Explorer. Thanks!

1 Like

Haha, we've been down this road before :stuck_out_tongue: I can't get rid of my "beloved" Windows quite yet.

1 Like

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