$isdir
From Scriptwiki
Returns informations on whether or not a directory exists.
$isdir(directory)
Returns $true if the directory exists, otherwise it will return $false
Examples
$isdir(C:\Windows)
$isdir(C:\zebra\lala\moocow)
See also
$isfile to check if a file exists.