Windows 10 Switching from drive letters to mount points

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Amishman
Donor
Posts: 56
Joined: 29 Dec 2013, 15:54

Windows 10 Switching from drive letters to mount points

Post by Amishman »

I recently added more drives to my Windows 10 pc and now I have used all of the drive letters. I am looking to switch over to mount points so I can add more drives in the future. MY script will distribute a file to the drive with the most amount of space. How do I switch that over to a mount point like C:\MountPoint\Drive_1?

Would I have to replace each drive letter with ['C:/MountPoint/Drive_1', 'C:/MountPoint/Drive_2'] ? It seems like there would be a better way.

I use qBittorrent.

Code: Select all

filebot.launcher.exe -script fn:amc  --output "C:/Movies" --log-file amc.log --action move --conflict auto -non-strict --def "seriesFormat={['D:', 'E:', 'F:', 'G:', 'H:', 'I:', 'J:', 'K:', 'L:', 'M:', 'N:', 'O:', 'P:', 'Q:', 'R:', 'S:', 'T:', 'U:', 'V:', 'W:'].collect{ drive -> def a=n; return new File(drive+\"/TV/\", a)}.sort{ a,b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{episode.special ? 'Specials' : 'Season '+s}/{s00e00} {t}" "movieFormat={['D:', 'E:', 'F:', 'G:', 'H:', 'I:', 'J:', 'K:', 'L:', 'M:', 'N:', 'O:', 'P:', 'Q:', 'R:', 'S:', 'T:', 'U:', 'V:', 'W:'].collect{ new File(it+'/Movies/'+any{collection+'/'}{''}) }.sort{ a,b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{n.replaceFirst(/^(?i)(The|A|An)\s(.+)/, /$2, $1/)} {' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, \" \") + ')'} ({y}) {\"[$vf]\"}/{n} {' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, \" \") + ')'} ({y})" "musicFormat=Music/{n}/{\$album/}{\${pi.pad(2)}. } {t}" --def plex=10.0.0.15:********* --def pushbullet=********* --def @/C:/Filebot_Ignore_List/ignore_list.txt --def deleteAfterExtract=y --def clean=y --def "ut_label=none" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Windows 10 Switching from drive letters to mount points

Post by rednoah »

Your format code does not differentiate between drive letters and folder paths, so you can just add your mount points to the list:

Code: Select all

['C:/MountPoint/Drive_1', 'C:/MountPoint/Drive_2', 'D:', 'E:', 'F:', ...

If all your mount points are in C:/MountPoint then you can of course generate the list of output folders in code:

Code: Select all

('C:/MountPoint' as File).listFiles().findAll{ it.directory } ...

:arrow: Please move your format into a separate *.groovy file and feel free to use multiple lines:
viewtopic.php?t=3244
:idea: Please read the FAQ and How to Request Help.
Post Reply