I have a hidden systems files folder (called " gsdata ") inside my primary Photo Library folder that I cannot delete for various reasons. Despite the folder being hidden, Plex picks it up in the scan and displays it as a folder in my Photo Library. I want to use “.plexignore” so that this sub-folder of my Photo Library is ignored and not added to Plex. I have tried all the combinations of .plexignore that I could find online but after the scan the .plexignore file is automatically deleted and the folder remains in Plex. Can someone please advise the correct way to create and write the .plexignore file so this folder can be excluded? Thank you.
Note that I have also tried adding the .plexignore file directly INSIDE the " gsdata " folder I want exclude using the “.” and “*” wildcard but it doesn’t work.
Your placement and contents of the file look correct to me. What concerns me is that the file is getting deleted. I haven’t used the .plexignore file in a while, but I’m pretty sure Plex doesn’t delete it. So I’d be looking for whatever is doing that. Could an antivirus program be quarantining it?
Thank you for the reply. I don’t have an antivirus program on the MacMini. Also, what’s very strange is that only the .plexignore file saved inside the master Photo Library file gets deleted. When I try to add the .plexignore file using the wildcard inside the gsdata folder itself, it does NOT get deleted. So it’s definitely the Plex scan that removes the .plexignore file. I guess it’s good that Plex is at least recognizing that the file is there but isn’t acting on it.
So my entry text of: # Ignore folder called “gsdata” gsdata/ is correct? I saw some examples that used an additional underscore (_) prior to the folder name to be excluded; so in my case it would be “_gsdata” - could this be the issue?
I don’t know the examples you’re referring to. All I’m aware of is Plex’s documentation. By that, if your folder name is _gsdata_ the line *_gsdata_/* appears correct, with the .plexignore file in the same folder that contains the _gsdata_ folder.
Like I said, I don’t have a lot of experience in this area, so hopefully a ninja will step in.
I’m not suggesting ignoring underscores. I mean files where the filesystem flag Hidden is set.
Those _gsdata_ folders have (macOS apfs/hfs+) chflags hidden _gsdata_ applied. The Windows FAT/NTFS equivalent would be attrib +h _gsdata_.
But on *nix it’s complicated. Modern filesystems support storing extended attributes, but interacting with them is hard. Most userspace programs just ignore them.
So it would be mildly nice if Plex ignored Hidden files, but since it’s OS & filesystem-specific, and pretty rare even on macOS and Windows, I understand why it doesn’t.
This is fun reading - the convention that dotfiles are hidden was an accident:
Thank you very much @beckfield and @Volts. @Volts I totally agree with you, I don’t understand why Plex doesn’t ignore hidden file systems automatically. @ChuckPa what would be a possible solution here in your opinion? If the underscore (_) is a legal filename character then the way I wrote the .plexignore file should be working since I added the underscores in the folder name exactly as it’s written. However, I get the feeling that those underscores might be causing an issue so would it make sense for me to create a .plexignore file that asks Plex to ignore any folder that contains the words “gsdata” anywhere in the folder name? If yes, what would be the correct way to write that script? Thank you!
Plexignore follows a regex with the globbing (wildcard) which isn’t always obvious.
Biggest rule is to NOT try to micromanage it.
Example.
*/_* doesn’t ignore _ _* does. <----- THIS IS PROBABLY WHAT YOU WANT ?
*/*.mkv doesn’t ignore mkv’s like you think it does *.mkv does ignore ALL the MKV files in the library section (the section will appear to lose content)
Adding the directory-relative qualifier ( */ ) is often counter productive
Ignoring a single directory Directory-One/*.mkv will ignore
–BUT–
If you’re ignoring an entire directory tree – WHY is it in there ??
Bottom line…
A directory is a file name in a higher-level directory. It has the added flag IS_DIR
Use .plexignore to ignore FileNames. The rest will occur naturally.
Thank you @ChuckPa. Unfortunately this directory gsdata is created by a third-party sync program called GoodSync and I cannot remove it. I wish I could but I can’t and that’s why it’s hidden by default…yet Plex is still picking it up. Your example above is helpful but it relates to ignoring mkv files. Would it be possible for you to please type out the example of ignoring an entire directory (folder)? It would be most helpful.
I edited my .plexignore file at the moment to the following based on your suggestion above (see screenshot).
I removed the / and it still doesn’t work and the gsdata folder is still in Plex, HOWEVER the .plexignore file is no longer being deleted after the scan (@Volts).
You might indeed see it in your logs but nothing below it should be scanned.
The scanner will know to stop at that directoryt
I see you’re using wildcards. Leading and trailing wildcards are where it gets goofy.
Don’t think like Windows with *.* . Linux and MacOS (unix base) aren’t that way.
Have you tested putting the name as it appears.
# ignore _gsdata_
_gs*
# or the name itself
_gsdata_
I can write one but I don’t nest directories, except Music and TV series, within directories for structure.
Can you give me an example of what you’d like to ignore so I can craft one for you?
EDIT: Think I can create one for you. I’m adding series to my test system’s TV library. I’ll work with that.
MyMedia/
TV/ <-- Plex points here
.plexignore
Star Trek (1966)/
Star Trek Continues/
Star Trek Deep Space Nine/
Star Trek Discovery/
Star Trek Enterprise/
Star Trek Strange New Worlds/
Star Trek The Next Generation/
Star Trek Voyager/
Stargate Atlantis/
Stargate SG-1/
Stargate Universe/
@ChuckPa thank you very much for taking the time to write out that example; I appreciate it.
Unfortunately I tried what you suggested above, with various combinations of text for .plexignore file, and none of them worked. I don’t know why this is. Maybe because the gsdata folder is a hidden folder. I’m note sure.
The only thing I didn’t try was to completely delete my Photo library from Plex and rebuild it from scratch with the .plexignore file saved inside. Maybe the “Scan Library” is not enough to delete the folder. Would this help? I would prefer not to have to do this since it’s a lot of work.
Please see here below some of the different text combinations for the .plexignore file that I’ve tried.
Any further suggestions are welcome, if not I may give up.
I don’t know how MacOS does things but what I do know:
Unix, which MacOS came from, doesn’t ‘hide’ files at the filesystem.
If an application wishes to hide files then that’s at the application level.
– Example: Synology and QNAP hide all @ files from being displayed (typically @eaDir, @Snapshots, etc).
– In the scanner, we must expressly tell the it to ignore any files or directory names which begin with @
Here is a test for you.
open a terminal session
cd to a directory where these _gsdata_ are found -or- one level above them
Type the following command
find . -type d -name '_gsdata_' -print
This command will find any directories named _gsdata_ from the current directory down to the bottom and print out the path to that directory.
If you get output, you have proof the files aren’t being “hidden” the way you think they are. MacOS applications are hiding them but the file system is providing truth.
When you print that out, there should also be a pattern forming.
highlight the first several directories in the terminal window and COPY to your clipboaard (usually right-click COPY)
Type the following
``` (back-tick / grave character usually to the left of the 1 key top left)
Paste the text here
```
@ChuckPa thank you very much for taking the time to write this all out. It seems the issue has been resolved now.
In case this helps for others with this issue, here is what I did:
(Note: the I am using a program called Good Sync to back up my photo library saved on OneDrive to an external hard drive connect to a MacMini that acts as the server connected to Plex that creates my Photo Media Library. When using GoodSync, a hidden systems folder called “_ gsdata _” is automatically created inside the top folder that is being synced between OneDrive and the External Drive. Plex was picking this hidden folder up in its scan thinking it was a media folder.)
Manually deleted the hidden folder “_ gsdata _” from my Pictures Library top folder
Ran the Plex scan on the library so that the erroneous _ gsdata _ media sub-folder was removed from Plex
I created the .plexignore file and saved it inside the master Pictures Library folder (i.e. the top folder). I used the text that @ChuckPa suggest above, see here below:
/Volumes/Mega Bisa Photos + Music/Pictures Library$
I ran the GoodSync scan again, which caused the hidden systems folder “_ gsdata _” to reappear inside the Pictures Library top folder.
I then re-ran the Plex directory scan on this Photos library and the erroneous “_ gsdata " media folder has NOT yet reappeared. I have been testing this and re-running the Scan Library for the past several days and the " gsdata _” media folder has not shown up in Plex.
I am not sure right now if it was my temporary manual deletion of the hidden systems folder or the .plexignore file that solved the issue. If the issue appears again, I will update this thread.