Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Basic script blues ;-)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Basic script blues ;-)



Just a little question.

Two versions of the same basic script.
Both compile.
The first one is OK (a folder is created, when not existing).
The second not.
I cannot find what is the problem with the 2nd one...

-- 1st script: OK --

try
tell application "Finder"
if not (exists folder "IBM 01:Users:parents:Desktop:Foo:Folder2") then
make new folder at folder "IBM 01:Users:parents:Desktop:Foo:" with properties {name:"Folder2"}
end if
end tell
end try


-- end of 1st script--



-- 2nd script: wrong --

try
	tell application "Finder"
		set Folder1 to folder ("IBM 01:Users:parents:Desktop:Foo")
		if not (exists folder (Folder1 & ":Folder2")) then
			make new folder at folder Folder1 with properties {name:"Folder2"}
		end if
	end tell
end try

-- end of 2nd script--

Thanks in advance for your help.

Bernard


_______________________________________________ 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


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.