Remove all related files on NAS from OSMC frontend

When I have finished watching a movie, I often delete it with my remote from the OSMC frontend. It correctly removes the .mkv file stored on my NAS, but it leaves all my (intentionally) downloaded metadata files like .nfo, .srt, .jpg, etc. This makes a mess of my movie folder. How can I force OSMC/Kodi to remove all related files? Due to Couchpotato renaming everything, it all has the proper naming. It will always be:

  • moviename.mkv
  • moviename.nfo
  • moviename-fanart.jpg

Also, my movies are all in one folder. (Yeah, I know, maybe that would make it easier to delete batches of files, but still would like to know if it’s possible) :slight_smile:


Nobody? How does not everyone have a cluttered directory full of files that are no longer necessary? Even the library cleanup doesn’t do the job.

Nope - not here anyway :slight_smile:

All our multimedia is laid out in 1-directory-per-title format so we don’t have the problem. If you have any scripting skills, you could quite easily write something which would re-organise your structure so it was 1-directory-per-title and that might make your life easier … or it might not - I’m sure you had good reasons for not doing it that way in the first place …


you can delete artwork using this excellent script :

1 Like

Fair enough. Already felt like this should be done. Although I did have good reasons, they became obsolute some time ago. Anyway, I just spent some time reorganizing. Now, the structure is like this:

—Movies [folder]
------Title1 [folder]
---------Title1.mkv [file] [file]
---------Title1-fanart.jpg [file]

When I delete a movie from the OSMC frontend (by means of the contextual menu > manage > remove from library > delete files (yes) it only deletes the MKV. So organizing multimedia in 1-directory-per-title format doesn’t change the behavior of deletion. Not for me at least…

1 Like

But if you’re accessing it by browsing (rather than, for example, selecting something from “Movies”) can you not now delete the folder containing what you’ve watched (and therefore everything in it)? Or, as you say, from the “Remove from library” option, if you go up a level?

(sorry, I can’t on my “Vero 2”, but I’m assuming that’s just because I’m just using the “Vero 2” remote rather than, for example, a wireless keyboard with a [Del] key).

See, the thing is, I have the parent folder option disabled. Why? Because it is so much cleaner to have all the titles/posters on my screen. I can’t go a level up, and frankly, I shouldn’t have to. The Kodi library is showing the titles and it is from that view where I want to delete it.

My setup is rather similar to your setup. On a Raspberry Pi 2 with a TV remote with CEC.

1 Like

Not possible. You must use file browser to remove a folder such as this. Kodi was thoughtful in ensuring that the media itself would not be lost simply by removing from the library. Sorry, yours is just an edge case that I suspect very few would be interested in.

1 Like

Thanks. I don’t agree with you completely though. Kodi clearly prompts me twice: once for library, once for actual deletion from source. If it can delete a file from this view, why not the entire subdirectory? I get your point, not possible. But I wouldn’t go so far to call it an edge case. One option is all you need to be able to tick: allow deletion of source subfolders. Done.

1 Like