How to format a Finder if then statement

Hi all…

I’m trying to write a portion of a script that checks for a folder within the home directory, and if its not there, it makes it. After the directory is confirmed, it checks for a file.

Error i’m getting is

tell application "Finder"
		if the folder ".ssh" of home exists then
			do shell script "script here"
		else if make new folder at home with properties {name:".ssh"} then
			do shell script "script here"
		end if
	end tell

Thanks!
Brian

I think i was able to make the folder check better, looks like it works this way.

set new_foldername to ".ssh"

tell application "Finder"
	
	if (exists folder ".ssh" of home) is false then
		make new folder at home with properties {name:new_foldername}
	end if
	
end tell

Just another way to skin the same cat

tell application "Finder"
	try
		make new folder at home with properties {name:".ssh"}
	end try
	do shell script "script here"
end tell

Even better, thanks!