Folder actions and .DS_Store

Fahrvergnuugen

I am the law!
So 10.3 allows you to tie an apple script to a folder. Does this mean that you could theoretically delete all .DS_Store and ._* files from a mapped smb drive when you eject the share [or even as a hack, every time you close the folder]

Right now I have a shell script that I run that ejects the share, it first does a find & remove of all .DS_Store and ._* files and then it unmounts the share.
 
Dah! I hate those friggin' .DS_Store and ._FileName files! I was hoping Apple did away with them somehow.

Question: Windows XP has the ability to remember window settings on our network drive, and still manages to not deposit an extra file in that folder. Why can't Mac OS X do the same? The reason is that our network volume cannot hide any invisible files, no matter what. The only file I've seen Windows deposit is Thumbs.db; OS X (and OS 9 for that matter) deposit tons more files, for no good reason.
 
How do you figure? I'v never used Samba and I've got .DS_Store files everywhere.

Clever idea, a folder action...!
 
Originally posted by Fahrvergnuugen
Its not OSX, its samba.

Ignoring for a moment the comments that the Finder is depositing the files, which it clearly is, even if it was the SAMBA embedded within OS X that was generating the files, what difference does that make? Is it an excuse? It's still a shipping part of the operating system that can certainly be changed by Apple...
 
erhm... u heard him it's samba.

if u can get samba to hide particular files in the network.. you won't have this problem
 
There's a small utility, floating out there on the boulevards of the Information Superhighway, called De_DDS, that deletes the .DS_Store files from your hard drive. Simply drop a folder or volume onto the program's icon and voila! These files, for the uninitiated, store information about window size, placement, and similar settings. Why OS X, even being UNIX based, needs these files, I have no idea.
 
As I mentioned earlier, it's even easier with Cocktail. Just set it up to do remove the files when you do your monthly maintainence. Simple as that. :)
 
And you can play some samba music at the same time as you cocktail, in case you're worried if Samba or not.
 
That post sounds like it belongs in Herve's...

De_DDS has the sole purpose of removing .DS_Store files, or you can automate it.

Okay, I'm really tired.
 
Some confusion here it seems.

The .DS_Store files are just there to store information about how you viewed that folder in Finder the last time. It contains information about window size, placement and size of icons and such. Pretty harmless in other words.

Besides, if windows followed 'nix defaults, they would be invisible in windows too, since the filename starts with a period.
 
Originally posted by elander
The .DS_Store files are just there to store information about how you viewed that folder in Finder the last time. It contains information about window size, placement and size of icons and such. Pretty harmless in other words.

Besides, if windows followed 'nix defaults, they would be invisible in windows too, since the filename starts with a period.
As far as I know, the only invisible file Windows creates (that the Mac can see, that is) is the Thumbs.db file. What other invisible files does Windows create?

Regardless, Windows can remember what folders should look like after the fact (without depositing the .turds), so why can't Mac OS X?
 
MDLarson:

Sorry if I wasn't clear in my writing. I didn't mean to suggest that Windows is creating invisible files. What I meant was that if Windows had adhered to the practice of hiding files whos names start with a period, the .DS_Store-files wouldn't be regarded as a problem.

As far as I can tell (I haven't done exhaustive testing), Windows does NOT remember where file icons where placed in a window the next time you open the folder, if you have manually dragged them to a new position.

If I am wrong, then I suppose Windows stores that information locally instead, which isn't better, just different. It would leave information on your local disk instead of on the server. Admittedly, that wouldn't bother other users but it would take up space on your disk.

Since hard disk space is generally cheaper on larger disks, and servers generally have larger disks than personal computers, Apple's solution would generally be more economic, albeit with the drawback of annoying Windows users. And that may not even be a drawback...
;-)
 
isnt that part of what the windows registry does? It stores info about programs and files installed on the computer, including icon arrangement.

Correct me if i am wrong!
 
Originally posted by elander
Since hard disk space is generally cheaper on larger disks, and servers generally have larger disks than personal computers, Apple's solution would generally be more economic, albeit with the drawback of annoying Windows users. And that may not even be a drawback...
;-)
Well, I control the computer side of our small business as well as graphic / web design, and OS X's invisible files are exactly what's keeping the OS off the Macs here. The last thing I want for our network is to have a useless but visible ._whatever file for every file an OS X machine opens. .DS_Store is mostly just annoying.

Anyway, here's a question: If OS X stores the display information in a .DS_Store file for a particular user on a particular OS X machine, would the folder view be the same for all OS X users, or does each user deposit their own .DS_Store? Maybe that one file houses all users' settings? Mostly curious on this one.
 
.DS_Store is mostly just annoying.
Yes, but they're also easily dealt with.

Well, I control the computer side of our small business as well as graphic / web design, and OS X's invisible files are exactly what's keeping the OS off the Macs here.
What software do you use? I'm a graphic designer and OS 9 still rules the roost because many design-related apps don't port over to OSX as smoothly (or the companies don't want the expenditure of switching to a new OS, training, etc). But at a small company, you wouldn't have that problem.
But if the only reason you're not in X is .DS stuff, wow, you must have it pretty good.
 
We have a number of iMacs scattered around the building. FileMaker is the program here. Everybody uses it to punch in their time, work on projects, etc. Since FileMaker 6 runs on OS X native, I can make the jump whenever I want.

There is a wretched OS 9 accounting program called NetBooks that we still use, but largely everybody but me could switch to OS X. You're right about designers using OS 9. My G3 400 would be the most expensive to update. I'm seeing the drivers and updates I need slowly coming out (or at least promises of such updates). I'd imagine my particular upgrade would be like getting a G5 (yes please!), setting the G3 and G5 side by side 'til everything works smoothly enough.

But... as far as invisible files, others may tolerate it, but it bugs the heck out of me.
 
Originally posted by MDLarson
Anyway, here's a question: If OS X stores the display information in a .DS_Store file for a particular user on a particular OS X machine, would the folder view be the same for all OS X users, or does each user deposit their own .DS_Store? Maybe that one file houses all users' settings? Mostly curious on this one.

Nope. There can be only one .DS_Store in a folder, and it will be used by everyone. Anyone that has the right privileges can change it by adjusting window settings.

You won't be able to tell wether you have those privileges or not in the settings window. If you change the settings, they'll always seem to work as long as you don't log out. The only way you'll know if they were made "permanent" is by changing the settings, and then log out and back in again to check if they were saved.

Also, there are some confusing aspects: the window settings for a particular folder are saved in the ".DS_Store" of the parent folder. Icon settings though are saved in the folders own ".DS_Store". So two files affect different attributes of the same folder.

You can find an excellent article explaining most of what .DS_Store is and how they work here:
http://www.macosxhints.com/article.php?story=20030305025744788

As for getting rid of them, or rather, stopping them from being written to servers shared by Windows users, that is a different matter. I haven't found a reliable way of doing it yet.

There is a way to stop them from appearing on Samba servers, by vetoing them in samba.config, but then you'll get a "permission denied" every time you try to copy an entire folder, which is suboptimal in my opinion...
 
Back
Top