Title: What are these ._ files and how to get rid of them ? Post by: PeterSt on January 27, 2017, 10:45:23 am For reference, also see Re: Cover art display in version 2.07 (http://www.phasure.com/index.php?topic=3798.msg40658#msg40658).
See below picture. These files are NOT images, although the extension tells so. Nothing - at least not on the Windows Operating System - can deal with it. It is very obtrusive because the Windows "associations" to extensions (like .jpg) expect what's in such a file according to all the rules which existed since Windows and beyond. Thus, Windows herself will fail upon opening such a file, but I too can't deal with it, because all de existing code deals with - in this case - .jpg's and expects an image in there. Not some "metadata" rubbish from (I'm sure) some other OS or platform. Do notice that such ._ prefixes exist in a couple of appearance forms and foremost that it can exist for any file in your "system". Which system ? that is actually question number one. But say this is a NAS and you copy folders from it to a local hdd etc., then this files come along and the damage is done. So really, this acts like a virus and the more it is spread to systems which don't/can't cope with it (all Windows I presume) the more will fail. If I "enumerate" music files and these include .AIFF files, then I expect music to be in there and not some rubbish. I - and anyone else - CAN NOT change a million lines of code and check whether it is really a music file. Or an image. Or a Word document. Or x 1000 more ... Getting rid of these files seems easy : go to some main folder by means of Explorer, type the ._ in the search field of Explorer (top right corner), select the complete result and delete all by one shift-F5 press. And wait until it's back, I suppose ... Or wait till something fails on your NAS, might it originate from there and you just deleted it there. So the question : I am thick enough to not understand or know where this originates from, and what I see in communication here and there with customers, it is tough explaining because they don't even know what I am talking about. And honestly, when someone drags along a USB pen from somewhere, the ._ files are already in its root. Where does this sh*t originate from, and can we prevent it from happening, the origin not failing meanwhile (read : suppose this is from a NAS and you delete all these files in there, will the NAS still be OK and won't the files be back "tomorrow"). Please notice and try to understand : If this "belongs" to your NAS, then it can not be avoided that the files end up in your Audio PC just the same, *because* all is copied of our interest, and this includes all the .jpg's and .AIFF's and, well, no need to explain. This, while it makes the program at our end fail. Help. Peter PS: The content of the picture you see below was sent to me by a customer and all he did was downloading Coverart data from the Internet somewhere, for some album. Quite harmless. Do notice though that in this case it is quite explicitly visible (not in below screenshot BTW) because it was obtained in a folder named _MACOSX). Another datapoint is that I am pretty sure that the Aurender also contains this sh*t quite explicitly, but still not knowing whether it originates there (it could download its music data from some source doing it). Btw, all what seems common to me is Linux (even OSX is Linux based). Title: Re: What are these ._ files and how to get rid of them ? Post by: AlainGr on January 27, 2017, 12:04:34 pm Hi Peter,
I remember this from a long time ago. While I suppose it is possible to know what these files are for, all I recall is that these files where normally invisible under Unix...They come from any OS based on Linux and Unix... They can contain different information depending on the application using them (folder attributes, indexation info, etc...). There are tools it seems to remove them but how to not copy them from one OS to the other... Alain Title: Re: What are these ._ files and how to get rid of them ? Post by: nik.d on January 27, 2017, 12:28:38 pm Files starting with "." (dot) are 'hidden' files (or directories) on Unix/Linux/Android and most probably OSX.
This files resemble me on 'Thumbs.db' in Win world - never understood why and when they are generated (not wanted to learn :)) Title: Re: What are these ._ files and how to get rid of them ? Post by: PeterSt on January 27, 2017, 12:46:59 pm Quote Files starting with "." (dot) are 'hidden' files (or directories) Yes, I forgot ... it can just as well be directories (even more obtrusive). Btw, below a picture of how you can see it go wrong ... (or envision that) Thanks, Peter Title: Re: What are these ._ files and how to get rid of them ? Post by: coliny on January 27, 2017, 04:59:03 pm The folder which caused me trouble was also called _MACOSX & contained a file ._PatriciaBarber-GreenMill-3.jpg. It came with a legitimate paid download I don't think its malicious, probably an oversight by whoever set it up. Deleting it was all I had to do.
Colin Title: Re: What are these ._ files and how to get rid of them ? Post by: Stanray on January 27, 2017, 05:01:53 pm I "get" these files when I download or rip music on my iMac.
When I copy these files to my MusicServerPC they become visible. They used to cause problems in XXhighend, but now I simply delete in Windows Explorer after copying and then its OK. Regards, Stanley Title: Re: What are these ._ files and how to get rid of them ? Post by: PeterSt on January 27, 2017, 05:39:31 pm Colin,
Quote It came with a legitimate paid download I don't think its malicious Maybe a language problem, but I never intended to say or even slightly imply that there's malicious things going on. All I said is "it spreads like a virus" because ... well, it does (by means of our own copying). Otherwise I don't think this is overlooked etc. by the provider of your album. It is merely like it is not even known / visible. It is merely like Stanley just said (thank you Stanley) - it just happens while you are not aware of it initially. Like putting in a USB pen in a Mac (only for reading something !) and receive it back with those files in it. Maybe something changes in the Mac (OSX) then because remember, ever back this did not happen. And it should not happen, obviously ! Peter Title: Re: What are these ._ files and how to get rid of them ? Post by: hvdh on January 27, 2017, 09:00:10 pm Not shure if this helps, but I just found this website:
http://apple.stackexchange.com/questions/14980/why-are-dot-underscore-files-created-and-how-can-i-avoid-them which states: quote You can't avoid them. They're created to store file information that would otherwise go into an extended attribute on HFS+ (Apple native) or Unix/UFS volumes; in earlier Mac OS this would be the resource fork. Finder file operations will create them automatically to store the icon information, plus Time Machine stores some information in them so if you copy a file backed up via TM it will have that information copied as well. unquote I guess there is no way to prevent them from being created.... Title: Re: What are these ._ files and how to get rid of them ? Post by: PeterSt on January 28, 2017, 10:04:57 am Hey Henk, yes that helps.
And so indeed it is so that a NAS is invoved. I mean, when that is shared between Windows and Mac ... there you go. But it looks like these files also can freely be deleted (and when you access the folder of concern via the Mac they will be recreated in that folder and again will bug you when used from Windows). Peter Title: Re: What are these ._ files and how to get rid of them ? Post by: hvdh on January 28, 2017, 03:16:19 pm Hi Peter,
I wouldn't mind at all if you added a bit of code to XXhighend which would delete these files everytime I "clear and refresh the Results List" I presume this would be easy to program, would be very unobtrusive for us users, and you might as well get rid of those daft "thumbs.db" files at the same time:) Or am I talking rubbish now? Henk Title: Re: What are these ._ files and how to get rid of them ? Post by: PeterSt on January 28, 2017, 04:13:43 pm Yes Henk, I am thinking about such a thing. But I am not 100% yet this is allowed, because I will be deleting things from a Mac source (think NAS) which uses it (but nothing will fail when they are not there, as I understood).
Thanks, Peter Title: Re: What are these ._ files and how to get rid of them ? Post by: PeterC on April 17, 2017, 03:35:40 am Peter, this is probably quite simple but I can't seem to delete these files once they are loaded to the playlist area without clearing everything. I seem to be limited to scrolling past them to the actual files, which means that I can't load multiple albums (or I can but play stops when it encounters the first such file.
I know that given my music is on exFAT formatted hard drive shared with Mac OSX, I am not able to permanently delete from the drive. But if I could delete from the play area, I could at least load multiple albums and get rid of the rogue files manually. Regards, Peter Title: Re: What are these ._ files and how to get rid of them ? Post by: PeterC on April 17, 2017, 03:46:41 am Sorry, I have answered my own question...I needed to enable right clicking on my trackpad so right click now works to remove rogue files from play area!
Title: Re: What are these ._ files and how to get rid of them ? Post by: PeterSt on April 17, 2017, 10:51:43 am Peter, it is still on my ToDo to do something about them. But it looks that this will take a performance penalty.
We'll see. Thanks, Peter Title: Re: What are these ._ files and how to get rid of them ? Post by: PeterC on April 18, 2017, 05:46:47 am Peter, could you not modify your software such that upon instructions to load into panel 2 and 3, files beginning with "._" are ignored?
Title: Re: What are these ._ files and how to get rid of them ? Post by: PeterSt on April 18, 2017, 07:43:44 am Hi Peter,
Yes. But it is not only about that and there. It is also about folders and especially Coverart (you are not using Coverart IIRC). So for example, when I investigate whether music files (or coverart) is in some folder structure in the first place, this is about "scans" for files with .WAV etc. extension and files with .JPG extension, respectively. Those scans now can't be just scans and the results must another time be filtered. What you suggest is easy to do in itself (and also no time penalty in order) but I wonder how even larger the anomalies will be when that's the only thing applied. Best regards, Peter Title: Re: What are these ._ files and how to get rid of them ? Post by: PeterSt on April 18, 2017, 03:40:02 pm Quote Those scans now can't be just scans and the results must another time be filtered. Maybe to clarify this better : Say that such a command looks like this : scan for *.jpg /s and what it means is that in all sub folders from where I am, I am looking for picture files with extension .jpg. Files are found, but they only comprise of ._ sh*t and I must fiilter them out afterwards. Meanwhile I had a result like "hey, this folder structure contains coverart !". Yea ? well, not if it only comprises of files starting with ._ because then it is all fake. Besides, if I want to show such a file as an image, the lot runs stuck and errors out. This scan command is one command only (with quite some processing internally) but the sorting out of what's really in there may contain a 20 fold of this one command and a lot of (il)logic to apply. Even worse is scanning for music files, because if a music file is detected, it is regarded to be, well, music, and it must list as such. Not when it is all fake. The whole lot can also be compared to Windows making such a thumbs.db file (which occurs a 1000 times in the program because it is an exeption to all other files because it is fake/dummy/Windows generated) with the notice that no matter you delete all image files, this thumbs.db file stays. The ._ files are worse regarding this, because they still imply an image file to be there (you deleted all images files) while nothing is in there for real, BUT the ones in there all fail (because they are no image files at all). I found an example in the code for you which pretty much (coincidentally) covers what I was just talking about. Without adjustment this snippet of code will go wrong in about each line of code; The check for the discovered file being a directory (folder) must be adjusted because complete folders with ._ exist and nothing of interest is in there. However, once such a folder is dragged along in the further active code, all goes wrong (I know). The check whether it is a Music File goes wrong, because any ._ really is not that at all. While we are dragging / dropping files here and the Thumbs.db is illegal to copy (it contains meta data for its specific folder while I am not copying the folder but individual files), for the ._ files will count the same but even worse because they don't apply to Windows. Anyway, allowing these files to pass on, als all starts to spread as a virus (I think I used the phenomenon in this topic somewhere). Notice though that what you look at is one of the 20 or so means to put files into the Playlist Area so already that requires more attention than just one place to adjust. This, while adjusting this small piece of cose only, may take a few hours because of the one "scan" command not being sufficiebt any more (this is actually the My.Computer.FileSystem.GetFiles piece of code). So you see, I hate it a bit when something on an *other* OS suddenly starts to imply problems. But isn't that Apple. Peter |