You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

.DS_Store and ._filename.xxx files showing up on windows server

I use a iMac on a windows 2000 network at my office. I connect to the network using Leopard built-in SMB netowrking features. After a few months of using my mac on the network and think everything was fine, I discovered today that each folder I have accessed now shows a .DS_Store file and a ._filename.xxx duplicate files to all windows users.

This server is a web server, so all files in web directories are showing up to all the users on the web.

Has anyone figured out how to prevent this from happening? If this cant be fixed, the mac has got to go!

Thanks.

Imac 2.8 GHz (office), MacBook Pro 2.16GHz (home), Mac OS X (10.5.1)

Posted on Mar 18, 2008 9:54 PM

Reply
11 replies

Mar 18, 2008 11:29 PM in response to Matt in LV

When you open a folder in the Finder, including folders on servers, a .DS_Store file is created, which records your set-up for viewing that folder (which view it has, how big the window is, what size the icons are, and so on). When you copy a Mac file with a resource fork (such as jpeg with a custom thumbnail), the resource fork is split off as a separate file on a Windows or UNIX server, and saved as ._file.xxx. There are several approaches to deal with these files. One is to get a program that will clean this junk off the server (there are several--didn't know that Cocktail was one of them), another approach is to delete them yourself using a non-Finder way to browse the Server folders (such as the Terminal) and remove things, and one I use is an Applescript to remove the stuff. The Applescript cleans up a folder and then copies it to a FAT32 drive, without the cruft, which Niel generously created for me.
Francine

User uploaded file
Francine
Schwieder

Mar 21, 2008 2:49 AM in response to Matt in LV

You can strip the resource fork from files before you move them to the server. There are various ways to do this. I use an Applescript that was crafted for me by Niel in the Applescript forum. Also, there is a new Terminal command in Leopard for getting rid of ._ files where they already exist. I just tried it out on a FAT32 drive and it worked fine. It goes thru and gets rid of all the ._ files from the place you start on thru the sub-folders. I used it on a thumbdrive called "KEYDRIVE" on which I had copied two files, and a folder containing two sub-folders.

NoobiX:~ francine$ dot_clean /Volumes/KEYDRIVE

Just launch Terminal from your Utilities folder, type the command "dot_clean" a space, and then drag the folder you want cleaned up into the Terminal window and drop it.
Francine

User uploaded file
Francine
Schwieder

Mar 21, 2008 4:35 AM in response to Matt in LV

You can set your Mac to not write .DS_Store files to network disks so Windows users stop complaining. Paste this command in terminal:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true



Existing .DS_Store files can be removed with this Applescript:

display dialog "When you delete .DS_Store files, you will lose window size and icon arrangement for EVERY FOLDER on the target disk. Furthermore, if you had any Spotlight comments (a.k.a.Finder comments) associated with any files, they'll also be deleted"
set mountedDisk to POSIX path of (choose folder)

tell application "Terminal"
if (count of windows) is 0 then do script ""
delay 0.1

do script "find " & quoted form of mountedDisk & ¬
" -name .DS_Store -delete" in front window
end tell


I have not heard of the ._filename.xxx problem, but if you are running Apache server you can tell Autoindexing to ignore filenames starting with "._":

IndexIgnore \._.*



You configure this in the server config file or .htaccess.

Apr 16, 2008 2:01 PM in response to Matt in LV

You need to be careful about getting rid of those ._file.xxx files. Since a FAT32 or NTFS drive does not have a way to save the Resource fork of a file, that's how OS X saves it. When you view the drive from OS X, all you see is the file name as you saved it. But when you open the file, OS X reads the hidden (from the Mac user) associated ._file.xxx so it can be used as a normal Mac file. If you copy the file back to your Mac, OS X recombines the data and resource fork information back into a normal Mac file.

That resource fork information also tells the Mac what program the file belongs to. Without it, most, if not all of the files you save from your Mac will be assigned generic icons. With some programs and some file types, the resource fork is where the data is stored. Mac Type 1 PostScript fonts and legacy Mac TrueType fonts all have their information in the resource fork. If you delete their associated ._file.xxx files, you will have 0 Kb files.

.DS_Store and ._filename.xxx files showing up on windows server

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.