Re: comments stripped out by MV or MVMAC shell script
Re: comments stripped out by MV or MVMAC shell script
- Subject: Re: comments stripped out by MV or MVMAC shell script
- From: Andrew Oliver <email@hidden>
- Date: Mon, 25 Apr 2005 01:22:32 -0700
On 4/25/05 12:59 AM, "Sander Tekelenburg" <email@hidden> wrote:
> At 22:54 -0400 UTC, on 2005/04/24, Doughtie, Dan wrote:
>
>> Have an applescript with several shell scripts. One shell script
>> successfully puts text into the comments field of the file.
>>
>> Then we've got a shell script that moves the file to another folder. We
>> tried MV and MVMAC and it moves the file and handles the permisions but it
>> strips out the Comments. Anyone know how to move a file and keep the
>> Comments. We use the Comments to tell another system how to handle a the
>> file. We can't use a Finder Move because we actually turn the Finder off for
>> reasons too long to explain here.
>
> Interesting. I would have expected ditto -rsrc to handle this, but it too
> loses the comment.
>
> I suppose you could first read the comments field, then move the file, than
> write the comment to it again.
Except that since the comments are stored in the Finder's metadatabase you
need to query the Finder to find out what those comments are, and the Finder
isn't running.
>Or encode/compress the file, move it,
> decode/decompress it, if you're willing to waste that much CPU on it ;)
The comments aren't part of the file, so compressing the file isn't going to
make any difference.
If you don't want the Finder to be part of the package then you'll need to
roll your own solution, either a file in the directory that store a comment
for each file, or some additional file whose name gives you some correlation
to the file it relates to (e.g. filename.txt.info stores the comments for
filename.txt). This only works, though if you're controlling all copying of
the files because as soon as someone copies the file in the Finder or some
other shell script your info file will be disconnected.
Andrew
:)
_______________________________________________
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