Difference between revisions of "$isdir"

From Scriptwiki
Jump to: navigation, search
m (page spacing)
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 11: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.