Code:
alias rmdir {
  if ($1 == -r) {
    if (!$exists($iif("*" iswm $2-,$2-," $+ $2- $+ "))) { return }
    if ($input(are you sure you want to delete $2- and everything in it?,owd,warning) != $true) { return }
    .echo -q $findfile($iif("*" iswm $2-,$2-," $+ $2- $+ "),*.*,0,remove $+(",$1-,"))
    !rmdir $iif("*" iswm $2-,$2-," $+ $2- $+ ")
  }
  else {
    if (!$exists($iif("*" iswm $1-,$1-," $+ $1- $+ "))) { return }
    !rmdir $1-
  }
}


/rmdir -r "c:\filepath"

Last edited by pheonix; 09/10/03 12:44 PM.

new username: tidy_trax