Если вам требуется обработка, например, переименование 1.JPG в MyPicture1-320x480.jpg и 2.JPG в MyPicture2-320x480.jpg и т. д., то, если вы используете оболочку Bash, вы можете перейти в каталог, содержащий файлы и используйте что-то вроде:
i=0; for n in *.JPG; do mv "${n}" "MyPicture${n/.JPG/-320x480.jpg}"; i=$((i+1)); done; echo "Processed ${i} files."
(Все вышеперечисленное можно ввести в одной командной строке.)
Или, если вы хотите поместить его в сценарий, его будет легче читать и понимать в нескольких строках:
# reset counter variable if you want to count the number of files processed
i=0
# loop for all files in current working directory that end with ".JPG"
for n in *.JPG
do
# rename (move) each file from the original name (${n} is generally safer than $n)
# to a new name with some text before the original name and then with the end of
# the original name (".JPG") replaced with a new ending
mv "${n}" "MyPicture${n/.JPG/-320x480.jpg}"
# increment the counter variable
i=$((i+1))
done
# display the number of files processed.
echo "Processed ${i} files."
Если обработка, которую вы хотите, отличается от этой, вам может потребоваться отредактировать свой вопрос, чтобы предоставить более подробную информацию.