Keeps Creating Subfolders and Format Naming Issue

Any questions? Need some help?
Post Reply
danielsokolowski
Posts: 9
Joined: 03 Jan 2013, 01:55

Keeps Creating Subfolders and Format Naming Issue

Post by danielsokolowski »

Hi FileBot Community,

I am going gray over this - it all started because I wished to add [<genre list] to the name of the files so I copied all my collection to "_To Sort" folder and run the following command on it:

Code: Select all

_FileBot Portable\filebot.cmd" -script fn:amc "H:/Media Library/_To Sort"  --output "H:/Media Library" --log-file "H:/Media Library/_Run FileBot on _To Sort.log" --action copy --conflict override -non-strict --def music=y subtitles=en artwork=y clean=y "movieFormat=Movies/{n} ({y})/{n} ({y}){\" CD$pi\"}{\".$lang\"}"
The movieFormat is taken directly from the "http://www.filebot.net/scripts/amc.groovy" script. This results in two problems one is that CD$pi and $lang are not subsitituded ( I assume you need this bit so that multi boot cd files would show CD1, CD2 appended as needed) and two which is so puzzling is that the input folder is duplicated. I'll explain with an example:

If input file was: 'H:/Media Library/_To Sort/Foo Movie 2011/Foo Movie 2011.avi' the out becomes 'H:/Media Library/Movies/Foo Movie 2011/Foo Movie 2011 [genre, genre]/Foo Movie 2011 [genre, genre].avi'

I am at a loss what to do here! Obviously I don't want the containing folder of the movie copied! The second part is how do I specify the {\" CD$pi\"}{\".$lang\"}" bit correctly.
danielsokolowski
Posts: 9
Joined: 03 Jan 2013, 01:55

Re: Keeps Creating Subfolders and Format Naming Issue

Post by danielsokolowski »

The CD$pi $lang bit seems to been fixed, for the duplication of folders I have using Windows searched move all files to one folder and run filebot on it as a work around. My script has changed really and is as follows - so thank you if you have fixed:

Code: Select all

"_FileBot Portable\filebot.cmd" -script fn:amc "H:/Media Library/_To Sort"  --output "H:/Media Library" --log-file "H:/Media Library/_Run FileBot on _To Sort.log" --action copy --conflict override -non-strict --def music=y subtitles=en artwork=y clean=y "seriesFormat=TV Shows/{n.replaceAll(\" \\(\" + y + \"\\)\",\"\")} ({y}) {genres}/{episode.special ? \"Special\" : \"Season \"+s.pad(2)}/{n} - {episode.special ? \"S00E\"+special.pad(2) : s00e00} - {t.replaceAll(/[\`\Â\´\â\€\˜\\â\€\™\Ê\»]/, \"'\").replaceAll(/[!?.]+$/).replacePart(', Part $1')}{\".$lang\"}" "movieFormat=Movies/{n} ({y}) {genres}/{n} ({y}) {genres}{\" CD$pi\"}{\".$lang\"}"
User avatar
bonelifer
Power User
Posts: 81
Joined: 23 Mar 2013, 18:27

Re: Keeps Creating Subfolders and Format Naming Issue

Post by bonelifer »

danielsokolowski wrote:

Code: Select all

"_FileBot Portable\filebot.cmd" -script fn:amc "H:/Media Library/_To Sort"  --output "H:/Media Library" --log-file "H:/Media Library/_Run FileBot on _To Sort.log" --action copy --conflict override -non-strict --def music=y subtitles=en artwork=y clean=y "seriesFormat=TV Shows/{n.replaceAll(\" \\(\" + y + \"\\)\",\"\")} ({y}) {genres}/{episode.special ? \"Special\" : \"Season \"+s.pad(2)}/{n} - {episode.special ? \"S00E\"+special.pad(2) : s00e00} - {t.replaceAll(/[\`\Â\´\â\€\˜\\â\€\™\Ê\»]/, \"'\").replaceAll(/[!?.]+$/).replacePart(', Part $1')}{\".$lang\"}" "movieFormat=Movies/{n} ({y}) {genres}/{n} ({y}) {genres}{\" CD$pi\"}{\".$lang\"}"
I wanted to thank you for posting that code, helped me figure out how to do specials in my code.
Post Reply