Re: Create New Folder
Re: Create New Folder
- Subject: Re: Create New Folder
- From: "Rips Ethan J" <email@hidden>
- Date: Tue, 8 Oct 2002 14:45:24 -0400
- Thread-topic: Re: Create New Folder
On Tuesday, 8 Oct 2002, "rhyme" wrote:
How can i create a new folder in a different directory then desktop ?
i use this script
tell application "Finder"
activate
set newFolder to (make new folder at desktop)
set name of newFolder to "pippo"
end tell
i want to create the folder "pippo" into the folder "cartella" that is in
Macintosh HD:Desktop Folder:Fantakap:XLS:cartella
if i write the directory instead of desktop in the script i have a key error
"rhyme"-
The code snippets below, from Bill Briggs & Michelle Steiner (with a minor
modification by me to allow user selection), combine to make a script that
creates a backup folder at whatever location you choose:
set todaysDate to (current date)
set {d, m, y} to {day, month, year} of
todaysDate
set monthList to {January, February, March, April, May, ,
June,
July, August, September, October, November, ,
December}
repeat with i from 1
to 12
if m = (item i of monthList) then
set monthString to text -2 thru -1
of ("0" & i)
exit repeat
end if
end repeat
set dayString to text -2 thru -1
of ("0" & d)
set todaysDate to monthString & "_" & dayString & "_" & y
set
destination to (choose folder with prompt "Select location to which folder
will be saved:")
tell application "Finder"
make new folder at destination
with properties {name:" Backup " & todaysDate}
end tell
HTH
Ethan
_______________________________________________
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.