Re: Changing the name of a file in the temporary items folder
Re: Changing the name of a file in the temporary items folder
- Subject: Re: Changing the name of a file in the temporary items folder
- From: Michelle Steiner <email@hidden>
- Date: Sat, 8 Dec 2007 09:09:28 -0700
On Dec 8, 2007, at 8:53 AM, Skeeve wrote:
Those were not false restrictions but true ones I had in May 2006.
As I said before "cp" solves the problem. It's just that "Finder" is
missing an important feature.
But, as I already wrote earlier, Jon's workaround is no solution as
it is impossible, using just AppleScript, to delete the temporary
stuff created in a clean way.
How about this:
set foo to choose file
set bar to choose folder
set fubar to path to temporary items from user domain
tell application "Finder"
repeat
set glorp to (random number from 1 to 1000) as text
if not (exists folder glorp of fubar) then
set grump to (make new folder with properties {name:glorp} at fubar)
exit repeat
end if
end repeat
set blimp to (duplicate foo to grump with replacing) as alias
set name of blimp to "new name." & name extension of blimp
delay 1
move blimp to bar
end tell
It doesn't get rid of the created folder, but it doesn't have to
because it is in the temporary folder.
But you were correct in your original message; "duplicate" and "move"
should have a "with properties" provision.
-- Michelle
--
Give Peace A Chance.
_______________________________________________
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