Help scripting this

Any questions? Need some help?
Post Reply
ryan780
Posts: 5
Joined: 09 May 2018, 00:33

Help scripting this

Post by ryan780 »

I want to be able to skip non-video files for when I scan my folders where torrents are downloaded. I was using TheRenamer until today when I discovered that the latest windows 10 update killed it. So, I paid the $10 for this software and immediately I'm regretting it because I've spent 5 hours trying to get this working. All i want is to rename and move ONLY video files from one folder to another. I have:

Code: Select all

filebot -rename "C:\Users\Ryan\Downloads\TV" --output "D:\My Videos\TV\_New" --format "{n.colon( )}.{s}{e.pad(2)}" -r
That i can't figure out how to skip non-video files.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help scripting this

Post by rednoah »

FileBot, by default, will only process media files, which includes media files and subtitle files.

1.
What does the log say?

2.
What exactly is not working as expected?

3.
Can you give examples for paths that you wish to process and examples for paths that you don't wish to process?

4.
Are you using Windows or Mac OS? Based on the file paths, probably Windows?

5.
Are you specifically asking about the CLI tool? Or the GUI? Different approaches are appropriate depending on whatever you use the CLI or the GUI, and depending on your CLI skills:
viewtopic.php?f=3&t=4222

6.
Are you using PowerShell or CMD? Is using PowerShell an option for you?

7.
You can pass specific files to FileBot for processing quite easily, however, on Windows it's somewhat tricky to do this on a recursive directly level without tools such as find commonly used for scripting on Linux. If you use PowerShell, it might be easier than with CMD.

e.g. processing all mp4 files in the current directory:

Code: Select all

filebot -rename *.mp4 --output X:/Media
The filebot -mediainfo --filter command could also be used to select files and pass them on to filebot -rename, similar to how find works on Linux. Let me know if you need help with that.
:idea: Please read the FAQ and How to Request Help.
ryan780
Posts: 5
Joined: 09 May 2018, 00:33

Re: Help scripting this

Post by ryan780 »

This time it also processed the .nfo files which are not relevant because they don't contain any info about the actual episode. But also, it renamed them leaving off the title this time. What could be causing that? It also doesn't seem to remember that I matched Gotham to Gotham and The Big Bang Theory to The Big Bang Theory....requiring me to rematch every time. Why is that? Is there not some internal database that remembers my selections.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help scripting this

Post by rednoah »

I'm not sure, you didn't answer any of my questions. Maybe screenshots would help?

:idea: Because I can't read your mind, and I can't see what you're saying, so you need to either post screenshots or describe things extremely clearly, preferably with specific examples. ;)
:idea: Please read the FAQ and How to Request Help.
ryan780
Posts: 5
Joined: 09 May 2018, 00:33

Re: Help scripting this

Post by ryan780 »

1.
What does the log say?
What log? how do i get the log?
2.
What exactly is not working as expected?
I told you, it is not using the previously matched names and forcing me to rematch previously matched titles. It is also importing non-relevant .nfo files.

3.
Can you give examples for paths that you wish to process and examples for paths that you don't wish to process?
Yes. ^.nfo
4.
Are you using Windows or Mac OS? Based on the file paths, probably Windows?
Windows, duh

5.
Are you specifically asking about the CLI tool? Or the GUI? Different approaches are appropriate depending on whatever you use the CLI or the GUI, and depending on your CLI skills:
viewtopic.php?f=3&t=4222
CLI because i'm trying to have this happen automatically after downloads occur so i don't have to do it by hand.

6.
Are you using PowerShell or CMD? Is using PowerShell an option for you?
cmd. does that make a difference?

7.
You can pass specific files to FileBot for processing quite easily, however, on Windows it's somewhat tricky to do this on a recursive directly level without tools such as find commonly used for scripting on Linux. If you use PowerShell, it might be easier than with CMD.
Okay, I will try powershell.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help scripting this

Post by rednoah »

2.
ryan780 wrote: 13 May 2018, 07:06 I told you, it is not using the previously matched names and forcing me to rematch previously matched titles.
I have no idea what you mean. Examples or screenshots are best to make sure we're on the same page talking about the same things.


7.
Not sure if PowerShell has any tool similar to Unix find -exec. FileBot does have it's own solution for that though, so it'll work on all platforms.


e.g. print all video files, kinda like find:

Code: Select all

filebot -mediainfo -r /path/to/folder --filter f.video --format {f}

e.g. call filebot -rename on selected files, kinda like find -exec:

Code: Select all

filebot -mediainfo -r /path/to/folder --filter f.video -exec filebot -rename --db TheTVDB {f} +

PS: On Windows you might need to do -exec cmd /c filebot because %PATH% is resolved by CMD and not Windows itself.
:idea: Please read the FAQ and How to Request Help.
ryan780
Posts: 5
Joined: 09 May 2018, 00:33

Re: Help scripting this

Post by ryan780 »

OMG... I just realized that you do have to match them up every time. This is the biggest piece of shit software I've ever seen. You don't remember the previous match selections?!@?@/ How do you automate anything???? This sucks. You are basically stealing people's money.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help scripting this

Post by rednoah »

It seems to me there's a large number of people that use FileBot to automate things just fine. What exactly are you doing different? What are you trying to do? What exactly is not working? Do you have examples or console output that illustrates your problem?


Here's how it works:

Code: Select all

$ filebot -rename . -non-strict
Rename episodes using [TheTVDB]
Auto-detected query: [Alias]
Fetching episode data for [Alias]
Fetching episode data for [Aria the Animation]
Fetching episode data for [Alias Grace]
Fetching episode data for [Alias Caracalla]
Fetching episode data for [Alias the Jester]
[MOVE] From [Alias.1x01.mp4] to [Alias - 1x01 - Truth Be Told.mp4]
Processed 1 files

:idea: Based on this command-line log, can you point out how it's not working? Looks like it's working to me. Does your command-line output look different? Maybe you could post your command-line output?


:?: Not sure what you mean by "remember the previous match selections" especially when talking about the CLI which is not user-interactive since it's a CLI.
:idea: Please read the FAQ and How to Request Help.
Post Reply