Scripting
>>
Perl
>>
How to create a directory if it does not exist
mkdir $dir unless -d $dir; if creating a subdir for Windows:- mkdir "$currentdir$subdir" unless -d "$currentdir$subdir"; for Unix:- mkdir "$currentdir/$subdir" unless -d "$currentdir/$subdir";
Please enable JavaScript to view the
comments powered by Disqus.