Filbot using directory name instead of filename during rename

All your suggestions, requests and ideas for future development
Post Reply
phhowe17
Posts: 3
Joined: 25 Apr 2017, 14:28

Filbot using directory name instead of filename during rename

Post by phhowe17 »

Using filebot 4.7.9 on Windows 10 pro, but this occurred in prior versions.

MegaDownloader sometimes creates folders using the name of the first file in the download. If you try to rename other files in the folder, Filebot uses the folder name instead of the filename as the rename source.

e.g. If I drag this file into the rename window

V:\Mega2\Now.You.See.Me.2.2016.1080p.BluRay.x264.DD5.1-FGT\The.Last.Starfighter.1984.720p.BluRay.x264-DON.mkv

It will suggest "Now You See Me 2 (2016)" as the rename for "The Last Starfighter..." file. If there are multiple source files to be renamed, it will suggest the parent folder for multiple source files (but not all of them)

BTW: I'm using a rename preset:

Files - Use original files selection
Format Expression = {n.replaceAll(/[:|]/, " - ")} ({y})
Options
Data source - TheMoviesDB
Language - English
Rename action - Rename
Match Mode - Opportunistic
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filbot using directory name instead of filename during rename

Post by rednoah »

Well, that path is just plain misleading. If you know that the folder name is misleading, then I'd just move all files to another folder (such as V:\FileBot) and then call FileBot on that folder.
:idea: Please read the FAQ and How to Request Help.
phhowe17
Posts: 3
Joined: 25 Apr 2017, 14:28

Re: Filbot using directory name instead of filename during rename

Post by phhowe17 »

It's a bug. Filbot should be only looking at the filename not the path to be sent for renaming. In any case it's inconsistent if I rename multiple items in that folder, most but NOT all of them get the path name used for suggestion. Some get the filename looked up.

I'm not aware of a use case for using the path name as part of renaming.

I realize Filbot is cross platform, but Windows has an API for finding the filename.
https://msdn.microsoft.com/en-us/librar ... 73589.aspx
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filbot using directory name instead of filename during rename

Post by rednoah »

I'm sorry FileBot doesn't work for your specific use case. FileBot is designed to work for as many people as possible and there's some strange strange stuff out there, which is why FileBot will check not just look at the filename, but also the parent folder, and parent parent folder, and so on, kinda like a human would.

In your specific case, a human would look at the path of each file and see two potential matches. This is why FileBot will ask you to make that decision. If both folder and file give you a perfect match (name + year) then the exact order is probably somewhat random and depends on implementation details that even I can't guess at without debugging things for a few hours.

I will consider this a bug and think about a solution once more than one single person is affected. Until then, you can use simple workarounds like the one I suggested in my previous post.


:idea: Java as an API for that as well. It's called File.getName(). :lol:
:idea: Please read the FAQ and How to Request Help.
bdg0296
Posts: 3
Joined: 06 May 2022, 14:56

Re: Filbot using directory name instead of filename during rename

Post by bdg0296 »

I have this problem as well. I want the option to ignore the folder path. I usually have my files in generic folder names and this causes many problems sometimes as it will only try to match the folder name and not the movie name. It would be a nice feature to opt in or out of using the path to find the name.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filbot using directory name instead of filename during rename

Post by rednoah »

bdg0296 wrote: 23 Jan 2023, 14:18 I have this problem as well. I want the option to ignore the folder path. I usually have my files in generic folder names and this causes many problems sometimes as it will only try to match the folder name and not the movie name. It would be a nice feature to opt in or out of using the path to find the name.
Can you post examples of file paths that don't work well? Please read How to Request Help.


:arrow: If you are using the FileBot Desktop application, and see a bad match, then press F7 to copy the file paths and matches, and then CTRL+V to paste them here in the forums, so we can have a look.
:idea: Please read the FAQ and How to Request Help.
Post Reply