Good day to you,

I would like to rename a batch of files using command line:

Code:
00001-fqAQHelS.mp4
00002-cKIaSnn1.mp4
00003-d6lha9ys.mp4
00004-eUyAzS7x.mp4
00005-nVFSjsiW.mp4
..
00010-ffdsfselS.mp4
00011-fqAQHelS.mp4
00012-cKIaSnn1.mp4
00013-d6lha9ys.mp4
00014-eUyAzS7x.mp4
00015-nVFSjsiW.mp4
Some files have 4 zeros at the begining (0001) and some 3 (00010), then 2 (00100),.. my command line is:

Code:
N=1; for i in *.mp4; do echo $i title_$[N+1].mp4; N=$[N+1]; done
The output is something like:

Code:
title_2.mp4
title_3.mp4
..
title_10.mp4
title_11.mp4
title_12.mp4
How can I keep the same number of zeros as the first ones:

Code:
title_00002.mp4
title_00003.mp4
..
title_00010.mp4
title_00011.mp4
title_00012.mp4
so number of digits (5) will remain the same??

Thanks in advance