unix script needs to be implemented in DOs Batch script
Posted: 04 Oct 2009 07:02
Hi all,
I have a unix script which needs to be implemented in DOS script
here is the unix script..
#---------script starts
nofiles=`ls | grep ^a`
#This line gets the all file and dir which start wih 'a'
for i in $nofiles
do
if [ -d $i ] # This line checks for dir
then
rm $i
fi
done
#---------script ends
my requiremet is to have to delete all ej* directories from a folder in one go..
Thnaks
I have a unix script which needs to be implemented in DOS script
here is the unix script..
#---------script starts
nofiles=`ls | grep ^a`
#This line gets the all file and dir which start wih 'a'
for i in $nofiles
do
if [ -d $i ] # This line checks for dir
then
rm $i
fi
done
#---------script ends
my requiremet is to have to delete all ej* directories from a folder in one go..
Thnaks