#!/bin/bash
function ergodic(){
for file in ` ls $1 `
do
if [ -d $1"/"$file ]
then
ergodic $1"/"$file
else
local path=$1"/"$file
local name=$file
local a=`echo $file | cut -d "." -f1`

if [ "${file##*.}"="pdf" ];then
`pdf2swf $file -o "$a".swf -T 9`
fi

fi
done
}
INIT_PATH="/home/weblogic/q"
ergodic $INIT_PATH