Removing .DS_Store files from mac folders
Greg Ewing
greg at cosc.canterbury.ac.nz
Wed Mar 8 23:19:15 EST 2006
David Pratt wrote:
> Hi Ben. I hadn't realize that walk was just giving the file name so the
> join did the job just great.
I don't think that deleting the .DS_Store files is the
right approach to this, for various reasons:
* You're messing with MacOSX's metadata, which is
not a nice thing to do to it.
* Your .DS_Store may contain info you'd like to keep,
such as icon positions in the window.
* One day you might want to do this under a userid
that doesn't have the necessary permissions.
* It might not even work, since the .DS_Store could
get re-created in between your purge and creating
the tarball.
It would be better to just avoid putting the .DS_Store
files in the tarball. For example, collect the pathnames
of all the .DS_Store files and give them as an exclusion
list to tar.
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list