$isdir: Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
Ollie (talk | contribs)
m page spacing
Ollie (talk | contribs)
m page spacing
Line 7: Line 7:
== Examples ==
== Examples ==


$isdir(C:\Windows)
alias exists? {
  if ($isdir($1)) { return directory exists! } | else { return directory doesn't exist }
}


 
$isdir(C:\program files\mirc)
$isdir(C:\zebra\lala\moocow)


== See also ==
== See also ==

Revision as of 10:36, 16 May 2007

Returns informations on whether or not a directory exists.

$isdir(directory)

Returns $true if the directory exists, otherwise it will return $false

Examples

alias exists? {
 if ($isdir($1)) { return directory exists! } | else { return directory doesn't exist }
}

$isdir(C:\program files\mirc)

See also

$isfile to check if a file exists.