I have this dir with multiple *.mp4 files. I would like to add serial no. in order as a prefix, still keeping the original name unchanged. I'm quite new to shell scripting, (also couldnt find a proper answer on google) so It would be nice if someone explains it to me. If it can be done with python, It would be even better!(i know py little bit)
The shell code i wrote:
n=01
for f in *.mp4; do
mv -- "$f" "$n+01. {f%.mp4}"
done
What my dir looked like:
***.mp4
***.mp4
***.mp4
What it looks like now:
01+01. {f%.mp4}
What I expect to happen:
01. ***.mp4
02. ***.mp4
.
.
12. ***.mp4
Thanking you in advance.