File named from directoryname not filename

Support for Windows users
Post Reply
gattonero
Posts: 2
Joined: 17 Aug 2025, 06:27

File named from directoryname not filename

Post by gattonero »

https://pastebin.com/7fshKUFU

Hello

I just bought Filebot and am trying to match my needs. English is not my mother tongue so i hope i can explain it correctly.
So my questions are:

1.)
I'm trying to set up filebot that it scans a folder and makes symlinks in another folder with correct filenames.
So Kodi can scan that folder and scrape the information.
And the Files it cannot find should end up with a symlink with their filename in the unsorted directory so i can name and match them personally.
It works quite good but sometimes it takes the foldername as movie name and sometimes it completely ignores a file so it does not show up anywhere...

The command i am using right now is:
https://pastebin.com/L44GsbBb

And the Log i get
https://pastebin.com/1i1i6hp5

Also no movie ever lands in the unsorted folder. What do i do wrong?

2.) Is there a way filebot deletes obsolete symlinks if the real file has been deleted?

I hope this is understandable and Thank you in Advanceand greetings from Austria.

Gatto
User avatar
rednoah
The Source
Posts: 24111
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: File named from directoryname not filename

Post by rednoah »

:idea: You'll want to name your "Completed Downloads" folder to something other than finito, for example complete or finished but anything that isn't the name of a movie / series is probably gonna be fine:

Console Output: Select all

[SYMLINK] from [D:\DOWNLOADS\Applejuice\finito\84 m².mkv] to [D:\2watch\Movies\Finito (2021) {tmdb=785588}\Finito (2021).mkv]

:idea: The log shows --def unsorted=y working as expected, e.g. a not-processed file is symlinked into the D:\2watch\Unsorted folder:

Console Output: Select all

Processing 1 unsorted file
[SYMLINK] from [D:\DOWNLOADS\Applejuice\finito\Serien\Kaiju No. 8 Mission Recon - 01 - Complete Movie.mkv] to [D:\2watch\Unsorted\Kaiju No. 8 Mission Recon - 01 - Complete Movie.mkv]





:idea: You'll want to google "delete broken symlinks on windows" if you want to find & delete symlinks that link to files that no longer exist. PowerShell is already perfectly suited to the job. FileBot might make sense if you need something that works equally on Windows / macOS / Linux and not just Windows.

e.g. find broken symlinks:

powershell: Select all

Get-ChildItem -Path "C:\MyFolder" -Recurse -Force | Where-Object {
    $_.LinkType -eq 'SymbolicLink' -and -not (Test-Path $_.Target)
}
e.g. find & delete broken symlinks:

powershell: Select all

Get-ChildItem -Path "C:\MyFolder" -Recurse -Force | Where-Object {
    $_.LinkType -eq 'SymbolicLink' -and -not (Test-Path $_.Target)
} | Remove-Item -Force





:!: You have added --def link=absolute but the amc script has no such option:

Console Output: Select all

Invalid usage: --def link is not used and has no effect

:idea: You can configure FileBot (via the configuration file) to always generate absolute symlinks like so: Absolute Symlink

Shell: Select all

filebot -script fn:properties --def net.filebot.symlink=absolute
** this is a one-time command that writes to the configuration file
** since you are processing files within Drive D (same file system) you may prefer to use hardlinks (default behaviour as per --action duplicate)






:idea: You can Revert files via the internal History if something didn't rename correctly. If you need to un-rename files renamed by FileBot then you will always want to do so via FileBot. If you manually un-rename files via Windows Explorer then xattr metadata will remain and affect file identification in subsequent filebot runs:

Console Output: Select all

Input: D:\DOWNLOADS\Applejuice\finito\84 m².mkv
       └─ xattr metadata: Finito (2021)
:idea: Please read the FAQ and How to Request Help.
gattonero
Posts: 2
Joined: 17 Aug 2025, 06:27

Re: File named from directoryname not filename

Post by gattonero »

Hallo and thanks for the quick answer!!!

I changed everything you wrote and started from scratch... seems to work perfectly.
I hope it stays that way!!!

Thanks a lot for your time and effort!!!
Post Reply