Hello,
My script needs to name all files in a directory to .flv
However this keeps the old extension so filename.mpg becomes filename.mpg.flv
Help me edit the script so filename.mpg becomes filename.flv
#!/bin/bash
for movie in /var/www/html/files/encode
/flv*.* ; do
NEWNAME=`basename $movie`.flv
NEWPATH=/var/www/html/file
s/encoding
/flv/$NEWN
AME
FINALPATH=/var/www/html/fi
les/encode
d/flv/$NEW
NAME
echo Processing $movie
echo -- New name is $NEWNAME
echo -- New path is $NEWPATH
echo -- Final path is $FINALPATH
done
Start Free Trial