Make duplicate of same file using batch file in windows -


i have 35 image in 1 folder, name imageset. want create 10 copies of each file , rename sequentially. ready 1 one image. there 1 image named img_01. when create 10 copies name of images img_01,img_02,img_03 ... ... img_10 . how can that? tried use code. not working. missing actually?

@echo off setlocal enabledelayedexpansion set count=10  set filename=img_ set start=1 set extension=.jpg   set source=%filename%%start%%extension%  /l %%i in (0, 1, %count%) (   set /a number=start+%%i    set destination=%filename%!number!%extension%   echo !destination!    rem echo %destination%   copy %source% %destination% )  pause  

from you're explaining seems want iterate on images in folder , create ten copies of each one. following should that:

setlocal enabledelayedexpansion set count=10 %%f in (*.jpg) (   /l %%i in (1, 1, %count%) (     set num=0%%i     set num=!num:~-2!     copy "%%f" "%%~nf_!num!%%~xf"   ) ) 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -