Jump to content

How to create a .ignore file


jasonmcroy

Recommended Posts

jasonmcroy

I am trying to exclude a folder from the library scan. I Googled this and searched the forum here and saw and went to the Wiki about this. All is says is to create a .ignore file in the folder I want to exclude. 

 

This is what I did - I created a new text document in Windows 10 text editor, changed the file extension to .ignore (Windows made me also give it a name, so I named it Emby.ignore) and saved it as that file. However, the folder is still showing up in my library scans.

 

Is there something I am supposed to place inside the file too? I tried putting .ignore inside the text document as well. 

 

Is this not working or am I doing it incorrectly?

Link to comment
Share on other sites

puithove

I think by giving it the name that you did, it's not being recognized.  I think the full name has to be just ".ignore" - although not straightforward with Windows, it should be possible (might need to do it from the commandline).  "Emby.ignore" is not equal to ".ignore" when something is looking for a specific file name.

 

Otherwise, according to this, you could also make the folder a hidden folder instead of creating a .ignore file - maybe try that.  https://github.com/MediaBrowser/Wiki/wiki/Excluding-files-&-folders

Link to comment
Share on other sites

puithove

Yea, just did this for fun.  From the commandline, this works:

rename "New Text Document.txt" ".ignore"

Or you could do it in one step with:

Echo "Ignore me" > .ignore
  • Like 2
Link to comment
Share on other sites

Happy2Play

Or name it just like the wiki says.  Little deceiving with the trailing dot.  So when you rename the file and extension you end up with a .ignore file

.ignore.
Link to comment
Share on other sites

jasonmcroy

I think by giving it the name that you did, it's not being recognized.  I think the full name has to be just ".ignore" - although not straightforward with Windows, it should be possible (might need to do it from the commandline).  "Emby.ignore" is not equal to ".ignore" when something is looking for a specific file name.

 

Otherwise, according to this, you could also make the folder a hidden folder instead of creating a .ignore file - maybe try that.  https://github.com/MediaBrowser/Wiki/wiki/Excluding-files-&-folders

 

Thanks. I thought about the hide folder aspect as well (I did read the data in that link) but I need the folder to be seen by another application as well. 

 

 

 

Yea, just did this for fun.  From the commandline, this works:

rename "New Text Document.txt" ".ignore"

Or you could do it in one step with:

Echo "Ignore me" > .ignore

 

Thanks. That does work. 

 

 

It should be just .ignore

 

Screen capture of mine on Windows 10:

 

57508ec502ea1_ignorefile.jpg

 

Thanks. At least I know it can be done! lol I did finally somehow manage to get it to work (outside of doing it via the CL even though that does work too. I had to create a named .ignore file then reopen it and delete the name and it finally let me save it that way. If I tried to create a new text document without naming it and changing the extension to .ignore Windows didn't like that at all.

 

 

Anyway, thanks everyone, I finally having it working now! I don't know why it wouldn't let me just save a new document with the extension changed and no file name before. 

Link to comment
Share on other sites

Happy2Play

Anyway, thanks everyone, I finally having it working now! I don't know why it wouldn't let me just save a new document with the extension changed and no file name before.

You can as I posted in post 4.  filename ".ignore" extention "."

Edited by Happy2Play
Link to comment
Share on other sites

jasonmcroy

You can as I posted in post 4.  filename ".ignore" extention "."

 

I did see that, however, if you put that as the file name it doesn't work. It has to be a non named file with the extension being .ignore and that was the original issue I was having and why I posted because Windows wasn't letting me create a .ignore file without a name. 

 

I tried it by naming it .ignore with the file extension being .ignore and the folder would still show up. 

 

As I said above, I was finally able to force it to create the file with no name and with the .ignore extension and it worked.

Link to comment
Share on other sites

jasonmcroy

Ok, glad it works for you, not working for me that way. I just tested it again and putting a name of .ignore on the file makes the folder show up again. 

Link to comment
Share on other sites

Koleckai Silvestri

File Explorer (also controls the desktop and the taskbar) can be silly at times. Easiest just to create it from the command line. Press shift, right-click in the window and say "open command prompt here" then create your file. The command echo '' >.ignore is the easiest.

 

Then if you want to use File Explorer, just copy and paste that file wherever you want it.

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...
Pixelpaule

Hey guys,

 

if i create a .ignore file in a folder would be subfolders also ignored?

 

Thanks

Edited by Pixelpaule
Link to comment
Share on other sites

  • 1 year later...

will give that a go, anything with sample in the name being ignored is why I must not have come across this before, this one just happens to be called preview :/

Link to comment
Share on other sites

  • 3 months later...

Mark it as hidden, however anything with sample in the filename is already ignored.

 

hi, its not working for me, where is my misstake?

Edited by minos
Link to comment
Share on other sites

Happy2Play

This was changed because apparently some TV shows have the word sample in the name.

 

Could the "sample" ignore be applied to only Movie content?

Link to comment
Share on other sites

  • 5 years later...
Daniel1966
On 6/2/2016 at 3:29 PM, puithove said:

Otherwise, according to this, you could also make the folder a hidden folder instead of creating a .ignore file - maybe try that.  https://github.com/MediaBrowser/Wiki/wiki/Excluding-files-&-folders

 

I love how the help article states "Just mark it Hidden" but proceeds to NOT tell you HOW to mark it hidden.

Brilliant!

Link to comment
Share on other sites

7 hours ago, Daniel1966 said:

 

I love how the help article states "Just mark it Hidden" but proceeds to NOT tell you HOW to mark it hidden.

Brilliant!

Hi, this will be corrected. Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...