Re: Script to save webloc
Re: Script to save webloc
- Subject: Re: Script to save webloc
- From: Scott Haneda <email@hidden>
- Date: Fri, 9 Jan 2009 13:03:07 -0800
Hi everyone, thanks for all the help on this one. I will work through
all your suggestions and adapt bits and pieces to get where I need to
go. I have one small question.
One of the nice things about my original use of the webloc file, it is
took care of a lot of things. For example, it dealt with non valid
chard in the filename, that the Finder does not like.
I am now passing my filename var through a small do shell script to
remove non alpha nunerics, which seems to work well.
The second item I can not solve, is duplicate file names. In my
solution, I do shell script and echo a value into a file name with
redirection ala ">". If the html file name is the same as another
one, the old one will get wiped.
With the webloc, it would append a 1 or number increment to the
filename, and I did not have to think about it. I can timestamp the
files, and that will give me a better chance of this not happening.
Any chance there is something built into AS that covers this? I
suppose the second I drop down into using do shell script any chances
of that are gone. However, even my AS native file writes are also
doing just what they should, write to the file.
If there is any way to get file name collisions to be a little safer,
it would be a nice one to learn.
Thanks.
--
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden