@echo off rem This is a simple implementation of mkdir. It starts out as a cmd file rem and switches to perl. rem rem This script is provided for convenience and is not supported in any way rem by Object Computing, Inc. rem rem Author: Chad Elliott rem Date: 4/15/2005 rem perl -x %~f0 %* goto exit #!/usr/bin/perl use strict; use Getopt::Std; use File::Path; my($status) = 0; my(%opts) = (); getopt('pm:', \%opts); ## getopt swallows a parameter after -p so we'll put it back if (defined $opts{'p'}) { unshift(@ARGV, $opts{'p'}); } foreach my $dir (@ARGV) { if (exists $opts{'p'}) { mkpath($dir); } else { if (!mkdir($dir)) { print STDERR "$0: $dir: $!\n"; } } } my($exit) = ' :exit rem ';