Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DouglasMcKibbin

macrumors newbie
Original poster
Dec 2, 2007
1
0
How can I write a simple Boolean expression for an if/then statement that tests whether or not there is a file on the desktop whose filename begins with "TNV", There appears to be no wildcard character in applescript.
 
Ironically what you wrote is almost exactly what you use e.g.

Code:
get every item in desktop whose name begins with "TNV"

Here is a working script:

Code:
tell application "Finder"
	set fileList to (get every item in desktop whose name begins with "TNV")
	if length of fileList > 0 then beep 2
	
end tell
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.