RE: using convert to batch convert
> > Wow! I've been using Linux for a year, and even from the first week
> > I have been trying (without success) to figure out how to do exactly
> > that (ren *.doc *.txt).
try ren doc txt
---------------------------------------------
#!/bin/bash
# ren
oldextension=$1
echo Old extension: ${1:?missing old extension argument}
newextension=$2
echo New extension: ${2:?missing new extension argument}
for i in `ls -1 *.$oldextension`
do
filename=${i%.*}
echo moving $i to ${filename}.$newextension
mv $i ${filename}.$newextension
done
---------------------------------------------------
--ejg:wq!
Reply to: