Re: deselecting on the Finder
Re: deselecting on the Finder
- Subject: Re: deselecting on the Finder
- From: <email@hidden>
- Date: Fri, 23 Feb 2001 18:24:50 +1300
Ricardo J. Seijo wrote:
>
Hi all. I am a beginner scripter. I'd like to write a script that
>
moves everything but a certain standard set of items from the Desktop to a
>
specified folder.
replace [option L] with the character generated by that keystroke
----------------------------------------------------------------------------
property movList : ""
property keePers : ""
property demButs : {"Cancel", "Set Keepers", "Move"}
property blah1 : "Move all?"
property blah2 : "Don't move!"
property blah4 : "Give the folder a name"
tell application "Finder" to[option L]
set allFiles to name of every file of desktop
display dialog blah1 buttons demButs default button 3 with icon -20010
set reeZult to button returned of result
if the reeZult is "Set Keepers" then
keePsum(allFiles)
else
set movList to allFiles
end if
set txtDate to (day of (current date)) &[option L]
" " & (month of (current date)) as text
display dialog blah4 default answer txtDate
set folName to text returned of result
makNmov(folName, movList)
on keePsum(allFiles)
set keePers to choose from list allFiles with prompt blah2[option L]
with multiple selections allowed and empty selection allowed
tell application "Finder" to[option L]
set movList to files of desktop whose name is not in keePers
return {movList, keePers}
end keePsum
on makNmov(folName, movList)
try
tell application "Finder"
make folder at desktop with properties {name:folName}
repeat with n from 1 to count of movList
move file 1 to folder folName
end repeat
set derDest to choose folder with prompt "Send " & folName & " where?"
move folder folName to folder derDest
end tell
on error m number n
end try
end makNmov
----------------------------------------------------------------------------
"the space needle points to the sky,
the space needle's such a nice guy"--Robyn Hitchcock
http://www.robynhitchcock.com
-------------------------------------------------------------