Re: new folder / move all REVISITED
Re: new folder / move all REVISITED
- Subject: Re: new folder / move all REVISITED
- From: "Bob.Kalbaugh" <email@hidden>
- Date: Sun, 09 Sep 2001 15:11:10 -0500
on 9/9/01 12:47 PM, T. Breheny / DiGiTAL ZEN at email@hidden wrote:
>
greetings,
>
>
i've since been able to simplify my script/process by forgetting about fancy
>
alias scenarios-- i just need to copy the contents of a fixed/known folder
>
to the most recently created folder in another directory (created by AS via
>
a filemaker script).
>
>
>
so w/ some help from brennan young (thanks) and the tidbits i picked up here
>
previously, i've come to the following:
>
>
-------------------------------------------------------------------------
>
property mainContainer : alias "KICKer:VAIL01:"
>
property mostRecentFolder : 0 -- just a dummy to start with
>
>
tell application "Finder"
>
activate
>
>
set the selectedItem to folder "KICKer:VAIL01:output"
>
>
set the filesToBeMoved to the entire contents of the selectedItem
>
>
if mostRecentFolder is not 0 then -- for first time round
>
move the filesToBeMoved to mostRecentFolder of mainContainer
>
else
>
display dialog "This is the first time you have run this script!"
>
end if
move end if to below the next two lines in your script or the script will
always attempt to create <mostRecentFolder> from the value on the clipboard
>
>
set fp to {name:the clipboard}
>
set mostRecentFolder to (make new folder at mainContainer with
>
properties fp)
>
Try this:(watch wraps)
--
property mainContainer : alias "KICKer:VAIL01:"
property mostRecentFolder : 0 -- just a dummy to start with
tell application "Finder"
activate
-- note change to statement
set selectedFolder to folder "KICKer:VAIL01:output:"
-- note change to statement
if mostRecentFolder is not 0 then -- for first time round
move every item of selectedFolder to mostRecentFolder
else
display dialog "This is the first time you have run this script!"
set fp to {name:the clipboard}
set mostRecentFolder to (make new folder at mainContainer with
properties fp)
end if
end tell
--
HTH.
--
bob.kalbaugh