Answer the question
In order to leave comments, you need to log in
How to rename the names of pictures in the correct sequence, starting from 1, depending on the date of creation of the original picture?
Hello. At this stage, the following code is available:
#!/bin/sh
p=1;
j=0;
wget $(sed "s/;/\n/g" url.txt) -P $p;
for i in $p/*.jpg; do
let j+=1;
mv $i $p/$j.jpg ;
done
sleep 1
exit 1
for i in $p/*.jpg; do
let j+=1;
mv $i $p/$j.jpg ;
done
Answer the question
In order to leave comments, you need to log in
I need it to rename the pictures in the script in the same order as in the original relative to the file creation date. How to do it?
ls -rt $p/*.jpg | while read i ; do
let j+=1;
mv "$i" "$p/$j.jpg" ;
done
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question