Kodi Community Forum

Full Version: How can I mark folders to not be scanned?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is there a way to have Kodi skip certain folders?    I tried the .nomedia file (with no extension) but it does not work.
It should work. Works for me. Make sure you have created it correctly. AFAIK you do it a bit differently depending on platform. I run Kodi on Nvidia Shields but all my content/media is on a Synology NAS so had to create the .nomedia file for Windows. If you do a search you will find different instructions based on platform.
Or use the context menu to set the content to 'none' and ignore from scan.
(2023-11-25, 16:31)wags1 Wrote: [ -> ]It should work. Works for me. Make sure you have created it correctly. AFAIK you do it a bit differently depending on platform. I run Kodi on Nvidia Shields but all my content/media is on a Synology NAS so had to create the .nomedia file for Windows. If you do a search you will find different instructions based on platform.

I am the same, nVidia Shield Po, Synology NAS using SMB.  The file name is all lower case .nomedia  with no extension.
@gquiring I use NFS but IDT that should matter. The file has to be created correctly. Look at the file properties. In details the file type should be "NOMEDIA file". IIRC if you use notepad to create the file it automatically tries to create it as a file type of txt. TBH it was pretty long ago that I did it but I seem to remember it was a bit finicky to get it right.
@gquiring Try this:

Using the file browser of your operating system locate the folder to be excluded
Inside the folder to be excluded, place an empty text file and name it as follows:
Windows systems- .nomedia.
Create an empty text file.
Rename the text file to the above name with the leading and trailing period.
Windows will notify you that changing the file extension will make the file unuseable. Accept this.
When Windows saves the name change, it will remove the last period and the new name will be .nomedia
All other systems- .nomedia
Kodi will read the filename and ignore the folder and its contents
(2023-11-25, 20:22)wags1 Wrote: [ -> ]@gquiring I use NFS but IDT that should matter. The file has to be created correctly. Look at the file properties. In details the file type should be "NOMEDIA file". IIRC if you use notepad to create the file it automatically tries to create it as a file type of txt. TBH it was pretty long ago that I did it but I seem to remember it was a bit finicky to get it right.

That's exactly what Windows property says - NOMEDIA file

I used Notepad++ to create the empty file, then I renamed it to remove the .txt with Total Commander.
(2023-11-25, 20:28)wags1 Wrote: [ -> ]@gquiring Try this:

Using the file browser of your operating system locate the folder to be excluded
Inside the folder to be excluded, place an empty text file and name it as follows:
Windows systems- .nomedia.

That's the trick, adding a . to the end of the file.   Thank you!!
@gquiring YW, glad you got it sorted. I remember stumbling around with it myself when I first did it until I got it to work. Honestly it was so long ago it took me a bit to find the trick/instructions…my old brain ain’t what it used to be…🤣
The Kodi docs make no mention of the trailing period which is not a common thing to use.  They should really add a 2nd file to look for (to keep compatibility with the current way) and make it super easy to create like .nomedia.txt
(2023-11-26, 03:22)gquiring Wrote: [ -> ]The Kodi docs make no mention of the trailing period which is not a common thing to use
Yes it does... https://kodi.wiki/view/Updating_or_remov...ude_Folder
(2023-11-26, 03:54)Karellen Wrote: [ -> ]
(2023-11-26, 03:22)gquiring Wrote: [ -> ]The Kodi docs make no mention of the trailing period which is not a common thing to use
Yes it does... https://kodi.wiki/view/Updating_or_remov...ude_Folder
That's weird whatever I found on Google had a different Wiki which did not show that.  But the docs are wrong, I'm not using Windows. My media is on Synology and my Kodi is run on Android.
@gquiring The instructions that I posted came from the Kodi wiki. Your Synology NAS is using the Windows file system (at least I know mine is) so that is why you need to use the Windows method to create the correct .nomedia file. It is confusing for sure which is why I stumbled with it myself when I first did it as I mentioned.
I agree it's confusing. When you add the . to the end of the file name it's not shown in Total Commander or Windows File Explorer. Since I run Kodi on Android I skipped over the Windows instructions.  When I Googled the issue there were a lot of comments it does not work, I'm sure it's that trailing period that caused the issue.  Simplest solution would be to add another condition to that IF clause and look for an alternate file name that uses an extension.
Never actually tested it, but I presume if you want to be completely covered for any type of sharing or client system, then there'd be no harm in having both variants of the nomedia file.
Pages: 1 2