Artwork from file path when using content menus

Any questions? Need some help?
Post Reply
User avatar
Ithiel
Power² User
Posts: 204
Joined: 11 Jul 2013, 14:58

Artwork from file path when using content menus

Post by Ithiel »

Hi Red,

I found your thread on creating context menus for FileBot, and not being one to leave well-enough alone, I'm trying to expand on it, lol.

Most of it I've got working, however I'm wanting to allow people to get artwork by clicking on a file within the folder as well, as opposed to just clicking on the folder.

I know that to have it find artwork from the folder path, you use this in the context menu:
@="cmd /c filebot -script fn:artwork.tvdb \"%1\" --log-file context.log"

.. but I'm not sure what I'll need to get it to work from a file within that folder (at present, that just throws up an error saying 'you're not a folder').

Is there a command to tell filebot to check for artwork using a file, or am I better off trying to figure out string manipulation within command prompt to trim the filename from %1 to just leave the path?

Thanks :-)
There can be only one Power² User
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Artwork from file path when using content menus

Post by rednoah »

Sorry, the script doesn't support that. It starts by finding folders/subfolders and that doesn't work if the root is a file already.
:idea: Please read the FAQ and How to Request Help.
User avatar
Ithiel
Power² User
Posts: 204
Joined: 11 Jul 2013, 14:58

Re: Artwork from file path when using content menus

Post by Ithiel »

all good - I managed to track down what I was after:

Code: Select all

@="cmd /c filebot -script fn:artwork.tmdb \%w\" --log-file context.log"
Per http://msdn.microsoft.com/en-us/library ... s.85).aspx, you can use %w to get the working directory :-)
There can be only one Power² User
Post Reply