TARGET="./dir1"
mkdir old
for i in $( find ./$TARGET );
do
    cp -R $TARGET old/
    sed -e 's/newtext/oldtext/g' old/$i > $i
done

