Re: 9.2.2 Delete everything in folder except for these items?
Re: 9.2.2 Delete everything in folder except for these items?
- Subject: Re: 9.2.2 Delete everything in folder except for these items?
- From: Kai <email@hidden>
- Date: Sat, 01 Feb 2003 00:24:50 +0000
on Fri, 31 Jan 2003 07:29:23 -0500, Dan Ball <email@hidden>
wrote:
>
I originally had the script delete everything and just remake the Alias's
>
and then rename them new alias's but it won't work with our security which
>
is FoolProof. FoolProof will let it delete and make the new alias's but it
>
won't let the scripts rename the new Alias's once they are made.
I could be wrong, but it sounds like you might have created the alias, and
then renamed it, in separate operations. But if you moved the new alias
directly to the target folder, I can't see that there'd be any real need to
rename it:
======================
set f to (choose file)
tell application "Finder" to [NO BREAK]
make new alias file to f at (path to launcher items folder)
======================
If you still wanted to rename the alias file, you could try making, moving
and renaming it in a single operation:
======================
set f to (choose file)
tell application "Finder" to make new alias file to [NO BREAK]
f at (path to launcher items folder) [NO BREAK]
with properties {name:"Test Alias"}
======================
This may not fool 'FoolProof' (especially in view of its name) - but it
might just be worth a try.
For the particular situation you mentioned, I still prefer the method I
suggested earlier. However the above suggestions may come in handy for other
purposes.
--
Kai
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.