[Windows] Context Menu w/ Folder Watcher+Scripts Pack [1.8]

How-to guides, frequently asked questions, not-so-obvious features, etc
Ztrust
Posts: 69
Joined: 21 Dec 2013, 17:04

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Ztrust » 29 Mar 2014, 02:15

thank you for the tip on how to get it ;)

Joon
Donor
Posts: 62
Joined: 05 Apr 2014, 14:13

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Joon » 05 Apr 2014, 14:20

Hi, im new here and i have a question!

Im confused as to what 'Folder Watcher' means, does this mean a folder is actively monitored if content is being pushed there, say by an autodownloader ?
If so, im missing how to do this.

I may be completely mistaken though but i am looking for something like the above.

User avatar
Ithiel
Power² User
Posts: 204
Joined: 11 Jul 2013, 14:58

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Ithiel » 06 Apr 2014, 02:04

Hi Joon,

Yes - the folder watch option allows you to create a scheduled task to rescan that folder for new subtitles at the regular interval of your choosing.

Remember, it will create the task on your local system telling it to run a scan over that particular path - so if you're creating it for a network location, browse via the full path (not via a network drive, that seems to get a little iffy), and make sure you have a constant connection to that network location when the task is set to run. :-)

Let me know how you go with it.

Cheers,

~Ithiel
There can be only one Power² User

Joon
Donor
Posts: 62
Joined: 05 Apr 2014, 14:13

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Joon » 06 Apr 2014, 07:24

Ithiel wrote:Hi Joon,

Yes - the folder watch option allows you to create a scheduled task to rescan that folder for new subtitles at the regular interval of your choosing.

Remember, it will create the task on your local system telling it to run a scan over that particular path - so if you're creating it for a network location, browse via the full path (not via a network drive, that seems to get a little iffy), and make sure you have a constant connection to that network location when the task is set to run. :-)

Let me know how you go with it.

Cheers,

~Ithiel
Ahh okay, but just subtitles ?
Was hoping for something along the line of renaming and moving :)

Thanks for elaborating !

Deltron
Posts: 1
Joined: 08 Apr 2014, 15:28

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Deltron » 08 Apr 2014, 15:48

Hi, i have 4 folders : TV Series, Movies, Animes and Animes Movies
How can i do to rename and move automatically Anime Movie into his own folder and not into the Movies one?
Thanx in advance :)

User avatar
Ithiel
Power² User
Posts: 204
Joined: 11 Jul 2013, 14:58

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Ithiel » 12 Apr 2014, 23:53

Hi guys, Sorry for the slow reply (crazy week).


@Joon,

The watch function is currently just for downloading subtitles. If you are looking for automated folder monitoring for renaming, I would recommend having a look at some of the different AMC (Automated Media Centre) options:

http://www.filebot.net/forums/viewtopic.php?f=4&t=215
http://www.filebot.net/forums/viewtopic.php?f=8&t=1267

I might look at extending the watch function to renaming down the road, but I'm a little flat out at the moment, and that requires a pretty heavy investment of time.


@Deltron,

During install, it ask you for the locations where you store TV Shows, Movies, and Anime. When you click the option to rename a show/folder, it will sort it depending on which 'type' you selected. If you select 'Anime', it will use your anime scheme and place it with the Anime. if you select Movie, it will use your movie scheme and place it with the movies.

If you would like an Anime Movie to be placed with Anime, you would need to select the Anime option instead of the Movie option, but keep in mind that this means it will be asking AniDB and not IMDB for the details, and will use a different naming scheme.

Currently, the script does not support a 4th category of 'anime movies' (movies renamed via the movie scheme/imdb but put into an anime movie folder).


Similar to the above request, I will try and look at adding the option for custom combinations down the line, but that will require some fairly extensive reworking, and when everything is being done via command prompt, it's a total pain in the ass to troubleshoot (so everything takes a while, haha).
There can be only one Power² User

seanap
Donor
Posts: 5
Joined: 15 Apr 2014, 06:23

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by seanap » 15 Apr 2014, 20:02

This looks like a great addition, thank you for posting all your hard work Ithiel! This is exactly what I was looking for, I already use AMC integrated in with uTorrent and I love it, but there some times when I have to post process manually.

I have followed your install instructions, however when I run the installer.cmd the command prompt flashes on the screen for a brief second and then disappears and nothing happens. I've tried to open cmd promt and copy paste the code in but it runs through it and closes the window and nothing happens. I've got to be doing something simple wrong, but for the life of me its got me stumped.

Resoleved
Last edited by seanap on 21 Apr 2014, 21:59, edited 1 time in total.

User avatar
Ithiel
Power² User
Posts: 204
Joined: 11 Jul 2013, 14:58

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Ithiel » 18 Apr 2014, 05:23

Hi Seanap, as long as FileNot is installed in c:\program files\filebot, it should be ok.

Try the live installer first (https://github.com/CapriciousSage/cmdle ... taller.cmd), and of necessary, right click -> run as administrator.

If it still freaks out, download the latest full installer instead (https://github.com/CapriciousSage/cmdle ... _setup.cmd). Try running normal first, then as admin of still no joy.

You can also try right clicking in the file, go to properties, and click "Unblock" if it is there.

If it still freaks out on you, send me a PM (maybe with a screenshot or two if you can), and I'll try and help you out :-)
There can be only one Power² User

seanap
Donor
Posts: 5
Joined: 15 Apr 2014, 06:23

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by seanap » 18 Apr 2014, 13:38

Thanks for your help getting this to work!

I feel pretty dumb, when I was saving the github installer as a .cmd chrome was adding a header. Note pad was also messing with the format, once I just copied and pasted the code into notepad++ everything worked flawlessly.

User avatar
Ithiel
Power² User
Posts: 204
Joined: 11 Jul 2013, 14:58

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Ithiel » 21 Apr 2014, 23:17

No worries mate - glad I could help :-)
There can be only one Power² User

Zerelah
Posts: 23
Joined: 18 Feb 2014, 16:22

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Zerelah » 11 May 2014, 20:53

hey Ithiel

I dont know if you can help or even if there is a solution but I will ask.
I have a watch folder set up for my new shows that dont have subtitles yet.
and when the scripts download subtitle it uses .eng format and I then run a rename to .English and then the next time the watch runs it downloads the subs again is there anyway I can edit the script to use .English instead of .eng ?
Hope you understand what I mean

User avatar
Ithiel
Power² User
Posts: 204
Joined: 11 Jul 2013, 14:58

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Ithiel » 12 May 2014, 07:39

@Zerelah,

This means that when you created the watch task, you selected the option of "with language tag".

The best way to fix this is to remove the watch (right click the folder again -> filebot -> watch -> remove), and then recreate it again by right clicking -> filebot -> watch -> Schedule Watch for Subtitles without language tag (should be the second option).

Let me know how you go :-)

Cheers,

Ithiel
There can be only one Power² User

fireheart2008
Posts: 36
Joined: 29 Jul 2014, 05:39

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by fireheart2008 » 02 Aug 2014, 22:28

first i want to thank you for this amazing tweak. especially the artwork fetching

[1] how to change the default naming scheme used by the context menu


i did this
Image

and got that
Image


[2] and report a bug with the artwork fetching that:

it works perfectly with the default naming scheme and this G:\Series\{n}\{n} {"s${s.pad(2)}"}/{n} - {s00e00} {" CD$pi"}{'.'+lang}
  • the {n} folder, say the vampire diaries, contains fanart, folder.jpg of the series [not a specific season] , logo, banner ...etc after artwork fetching

    the {n} {"s${s.pad(2)}"} folder, say the vampire diaries s01, contains folder.jpg of the specific season and some other photos after artwork fetching
Image

however when using the scheme G:\Series\{n} ({genre})\{n} {"s${s.pad(2)}"}/{n} - {s00e00} {" CD$pi"}{'.'+lang}
  • the {n} ({genre}) folder, say the vampire diaries (drama), contains NOTHING after artwork fetching

    and the the {n} {"s${s.pad(2)}"} folder, say the vampire diaries s01, now contains fanart, folder.jpg of the series [not a specific season] , logo, banner ...etc after artwork fetching
Image
Last edited by fireheart2008 on 03 Aug 2014, 01:05, edited 1 time in total.

JannikTN
Posts: 2
Joined: 08 Oct 2013, 18:55

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by JannikTN » 02 Aug 2014, 22:51

is there a way to get the amc script to work in a context menu like this?

User avatar
Ithiel
Power² User
Posts: 204
Joined: 11 Jul 2013, 14:58

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Ithiel » 03 Aug 2014, 09:19

@JannikTN,

Not sure, sorry. I'm not really that familiar with the AMC, but if you had a script you wanted to run in a context menu, you could certainly tweak what this creates and adapt it to what you're needing.

@fireheart2008,

You can certainly change the default naming scheme, but output.txt is not the file to edit for that one.

During install, when asked if you would like to use the cloud based naming scheme, say no - this will create 3 text files (anime.txt, movies.txt, and tv_shows.txt) in c:\program files\filebot\cmdlets. From here, you can edit these text files to use the naming convention of your choice.

The file output.txt is for the base path of where you want files to be moved to upon completion of their renaming. This should be a static path that does not use any groovy code (the default values are based on the answers provided during the install).

For example, my output.txt file looks like this:
\\mynas\media\Anime\
\\mynas\media\TV Shows\
\\mynas\media\Movies\

If you did not select the right options during install to create these files (and set the registry to look for them), I would recommend un-installing and reinstalling the context menu (run the setup cmd file, select uninstall, follow the prompts, then re-run and install accordingly).

Hope that helps :-)
There can be only one Power² User

JannikTN
Posts: 2
Joined: 08 Oct 2013, 18:55

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by JannikTN » 03 Aug 2014, 09:59

Ithiel wrote:@JannikTN,

Not sure, sorry. I'm not really that familiar with the AMC, but if you had a script you wanted to run in a context menu, you could certainly tweak what this creates and adapt it to what you're needing.
i'm just looking for an extract, rename and move to the right folder on my nas script :) not sure which is the right one to use

fireheart2008
Posts: 36
Joined: 29 Jul 2014, 05:39

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by fireheart2008 » 04 Aug 2014, 21:46

after uninstalling and re-installing

i selected
D:\TV & CENIMA\Anime
D:\TV & CENIMA\Series
D:\TV & CENIMA\English movies

when the cloud managed naming scheme appeared, i choose No

however i got this
Image
so i added the paths by myself. i guess there is an issue with win 8.1 x64

concerning the renaming scheme, I managed to do it. the problem was that the naming scheme was so complicated and long that i thought it is something else other than the naming scheme that should not be altered. then i told myself to give it a shot and it worked.


thank you for your fast reply and patience reading this

User avatar
Ithiel
Power² User
Posts: 204
Joined: 11 Jul 2013, 14:58

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Ithiel » 05 Aug 2014, 07:11

@fireheart2008,

I'm running Win 8.1 x64, and this is the machine I wrote/tested it on, so that shouldn't be an issue.

During the setup, in addition to the Yes/No re cloud scheme, it also asks you for 3 directory paths (which you MUST end with a "\"). Those three paths make the first three lines of output.txt... although there's a chance the ampersand (the "&" symbol) in your path might cause it to freak out... Just a thought.


The default (super complicated and fancy) naming scheme is thrown into anime.txt, movies.txt, and tv_shows.txt. The scheme I wrote is slightly over the top for most applications, but I really like it, and it also uses just about every trick there is, so it's also a very useful learning tool.

If you would like to try your own naming scheme, this thread is a great place to find out pretty much everything:
http://www.filebot.net/forums/viewtopic.php?f=8&t=1267

@JannikTN, you'll probably also find the above pretty helpful as well, as there's a number of AMC resources there too :-)
There can be only one Power² User

lost89577
Posts: 1
Joined: 19 Sep 2014, 08:29

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by lost89577 » 19 Sep 2014, 08:56

i can not work out what to edit in anime.txt,tv_shows.txt, movies.txt to give me simple file naming and remove all the extra stuff that is screwing up xbmc.

there is too much syntactic for me to work it out.

filebot will also change/reset the file format when these scrips are run

tv show (thetvdb)
-what i get
show (year rating etc) / season # / show 1xspecial1 - name.avi
-would like
show / (season # / show - 0x01 - name.avi

moves
-what i get
(collection)/movie (Year rating etc) / movie part 1 .avi
-what i want
movie(year)/Movie (year) cd1.avi

User avatar
Ithiel
Power² User
Posts: 204
Joined: 11 Jul 2013, 14:58

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Ithiel » 21 Sep 2014, 13:25

Hi lost89577,

Those 3 text files just need the naming scheme you would like to use - you can either use the example that comes with it, grab some of the examples here on the forums, or try your hand at writing your own variant.

To learn more about writing a naming scheme, check out this rather useful post I've put together in the help section - it's got a great collection of resources to get you going :-)

- HOW TO Everything: Scripts, Guides & Code Collection!
There can be only one Power² User

JerTurowetz
Posts: 1
Joined: 01 Oct 2014, 15:43

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by JerTurowetz » 01 Oct 2014, 16:00

Hi there!

Perhaps you can help. I'm trying to get a custom filebot script (uTorrent triggers on a completed download) to match the naming and artwork formats used by your context menu tool. I've downloaded your files from the github but I'm at a loss at where to even begin.

My script:

Code: Select all

c:/chp/chp.exe "C:/Program Files/FileBot/filebot.exe" -script fn:amc --output "M:/" --log-file amc.log --action move --conflict override -non-strict --def "seriesFormat=TV/{n}/Season {s}/{n} - {s00e00} - {t}" --def "movieFormat=_INBOX/_new movies/{n}/{n}" --def "movieFormat=_INBOX/_new movies/{n} ({y})/{n} ({y})" --def music=n --def artwork=y --def clean=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
Your movie format:

Code: Select all

{collection.replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/).replaceFirst(/^(?i)(Collection of the)\s(.+)/, /$2 Collection/).replaceAll(/Saga Collection/, "Saga").replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ")}\{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y}{' '+any{certification}{imdb.certification}.replaceAll(/^\d+$/, 'PG-$0')})/{norm(n)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}{" Part $pi"}{" [$vf $vc $ac $af]"}
I basically just want to use the same naming & artwork format for both my script and the context menu tool (as you can see I don't even know where to begin with the artwork). Any help or direction would be greatly appreciated.

I hope this is the appropriate place to post this - please advise if not. I wouldn't want to be breaking any forum rules.

Closure
Posts: 5
Joined: 04 Oct 2014, 02:21

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Closure » 05 Oct 2014, 03:41

Hey, I've edited your movie and some tv code I really love your context menu and almost all of your naming schemes.
I was wondering if you could help me out real quick though, the only thing I cannot get to work is changing S01E01 to S01xE01 or S01.EP01

Could you help me with that? Ive been trying for 45 minutes or so but I cant really figure it out and I dont want to remove the padding or anything. Its prob simple but its been a long day:P. This is what I have so far.

Code: Select all

E:/Downloads/Tv Series/{norm = {it.upperInitial().lowerTrail().replaceTrailingBrackets().replaceAll(/[`´‘’ʻ""“”]/, "'").replaceAll(/[:|]/, " - ").replaceAll(/[?]/, "!").replaceAll(/[*\s]+/, " ").replaceAll(/\b[IiVvXx]+\b/, { it.upper() }).replaceAll(/\b[0-9](?i:th|nd|rd)\b/, { it.lower() }).replaceFirst(/^(?i)(The)\s(.+)/, /$2, $1/)}; norm(n)}{if (norm(n) != norm(primaryTitle)) ' ('+norm(primaryTitle)+')'}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""} ({y})/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{norm(n)} [{episode.special ? 'S00E'+special.pad(2) :s00e00}] {norm(t)}{fn.contains('3D') || fn.contains('3-D') ? ' '+'3D':""}{' (' + fn.matchAll(/extended|uncensored|remastered|unrated|uncut|directors.cut|special.edition/)*.upperInitial()*.lowerTrail().sort().join(', ').replaceAll(/[._]/, " ") + ')'}{" Part $pi"}{" [$vf-$group]"}

Ztrust
Posts: 69
Joined: 21 Dec 2013, 17:04

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Ztrust » 06 Oct 2014, 23:38

hey Ithiel
I am affraid this no longer works for me since I have begun to have a lot of files without subtitles, so I removed the watch and tried to add again and when I do the cmd opens and it says "the system cannot find the path specified" its on D/!series and in the watchlist.txt its listed as
FileBot-Watch D_Series
FileBot-Watch D_Movies
Hope you can tell me what to do ?
Ztrust

User avatar
Ithiel
Power² User
Posts: 204
Joined: 11 Jul 2013, 14:58

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Ithiel » 12 Oct 2014, 04:13

Hm... yup - it seems something has changed with the most recent versions of FileBot (or with the sites it pulls data from) that is causing the subtitle fetch functionality to behave somewhat less ideally than predicted... Which is a fancy way of say "aw crap, it broke", lol.

I'll look into what's happening as soon as I get some time and will post an updated version once I've got a working solution for everyone :-)
There can be only one Power² User

Ztrust
Posts: 69
Joined: 21 Dec 2013, 17:04

Re: [Windows] Context Menu w/ Folder Watcher+Scripts Pack [1

Post by Ztrust » 12 Oct 2014, 14:28

Thank you ;)

Post Reply