Answer to the "._" files question
Answer to the "._" files question
- Subject: Answer to the "._" files question
- From: email@hidden
- Date: Thu, 21 Jul 2005 17:56:39 -0400
Hi,
I'd love to see a plain AS way of handling the "._" and the ".DS" files
when a Mac file is uploaded to an SMB share. However, here's the way I'm
handling it for now, for anyone who's curious.
I use a shell script to find and delete the unwanted files. Here's the
relevant part of the script
set cleanPath to " /Volumes/volumeName/uploadFolderName"
set cleanUp to ("cd" & cleanPath & ";" & "find . -name \"._*\" -exec rm
'{}' \\; -print" & ";" & "find . -name \".DS_Store\"
-exec rm '{}' \\; -print")
do shell script cleanUp
What I found in an Apple Tech Note is that you can string shell commands
together if you separate them with a semi-colon. So,
first I change directories to the cleanPath directory,
then I find and delete the "._" files, then I find and
delete the ".DS_Store" files.
As I was researching this, I found many warnings about the dangers of
deleting these files, so I'd be remiss not to mention
those concerns here. However, the above shell script
does work to delete these unwanted - at least unwanted
by non-Mac users - from an SMB share.
Best,
Jim
Here's my original post:
Hello,
I'm writing a droplet that uploads items to an SMB share. I want to
eliminate the ".DS" and "._" that show up on the share after the upload.
However, I don't know how to address such "hidden" files in AppleScript. I
notice that even when I use a utility to "show hidden files" in the Finder,
I still don't see "._" files. Further, the AS "count" command doesn't
include a count of such files, implying AS doesn't "see" them either. So
far, nothing I've tried will delete these hidden files. Does anyone have a
suggestion?
Thank you,
Jim
Jim Trebilcock
Jim Trebilcock
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden