Create Sample and Subs Directory
Posted: April 15th, 2009, 4:18 pm
Here is my script which I use to create the Sample and Subs Folders. The Script creates both folders and tries to copy Sample & Subs to their directory. If Sample and/or Subs do not exist, the folder is deleted immediately. I am using this method now for a while and it worked very well for me. Enjoy.
Code: Select all
cd $1
mkdir Sample
mv *sample* ./Sample/
if [ "$?" -ne 0 ]
then
rm -r Sample
fi
chmod 755 Sample/
mkdir Subs
mv *subs* ./Subs/
if [ "$?" -ne 0 ]
then
rm -r Subs
fi
chmod 755 Subs/