Making Folders
Making Folders
- Subject: Making Folders
- From: Steve Suranie <email@hidden>
- Date: Fri, 06 Jan 2006 10:31:43 -0500
- Thread-topic: Making Folders
Hi all:
I am trying to write a subroutine that creates folders based on user input.
I'm getting a syntax error when I go to check if the name the user selected
already exists. The error I am getting states:
Expected "," but found identifier
Here's the subroutine:
on folderMaker(topLevelPath, i)
display dialog "Item" & i & ": Enter the name of the folder you are
creating. Please use the format SKU_DESCRIPTION_MODALITY" default answer
"EXAMPLE: 00001_RedShirt_HI"
set thisFolderName to text returned of result as string
set folderPath to topLevelPath & thisFolderName
(*THIS IS WHERE THE SCRIPT IS BREAKING> ON THE IF STATEMENT BELOW*)
if not (exists folder thisFolderName of (topLevelPath as alias)) then
display dialog "Make folder"
else
display dialog "This folder already exists, would you like to select
another name?" buttons {"Yes", "No"} default button "No"
end if
end folderMaker
I've copied this bit of script from another script on the Apple web site:
on adding folder items to this_folder after receiving these_items
tell application "Finder"
if not (exists folder "Done" of this_folder) then
make new folder at this_folder with properties {name:"Done"}
end if...
I can get it to compile if I rewrite it as:
if not (exists thisFolderName of (topLevelPath as alias)) then
but then I get an error message saying
Can't get thisFolderName of alias "ImageDump:Online
_Shop_Originals:2006:HI:HI_apparel:tops:".
Any help would be appreciated
Thanks
Steve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden