#1 : 27/01-25 23:49 Mark Schnegg
Posts: 1
|
Is there a way to take 1 file and duplicate it a number of times, giving each file an increasing number? Also would be useful to add a string to the end of the file name before the extension at the same time (might have to be a separate step - I've already done this)
Thanks |
#2 : 28/01-25 11:40 Styb
Posts: 149
|
Reply to #1:
Hi, I think there are two strategies to get what you are looking for: the first involves manually copying the file with repeated copy-paste controls and adding the files into the program, and the second is to create a batch file with two command lines, one for the creation of the copies and one for the renaming of the copies. Personally, I prefer the first, as Advanced Renamer is not a file manager, but I will try to explain the second too. First: Add to the program the files obtained with a copy-paste and apply two methods to obtain the renamed files: 1> New name: enter the new favourite name 2> Add: -<Inc Nr:1>-string (allows you to add an incremental number and a string before the extension) At Index: 0 Backwards: Yes See the following two images: https://i.postimg.cc/HL2FqhYq/IMG1.png https://i.postimg.cc/d37XTQ2F/IMG2.png Start the batch to get the renamed files. Second: Save the previous two methods (by clicking on the floppy icon at the top) to your preferred Path2, for example C:\Path2\NewInc.aren . From the Tools menu, go to Command line and select your saved .aren file. Tick the 'Items from path' radio button and enter C:\Path1\ which contains the file you want to duplicate and rename. Press the button at the bottom to save the .bat file. See the image: https://i.postimg.cc/fLW7PHyg/IMG3.png Now you need to modify the bat file, e.g. with Notepad, to add this first line: for /l %%i in (1,1,12) do copy "C:\Path1\test.txt" "C:\Path1\test%%i.txt" where test.txt is the file you want to duplicate and 12 is the number of duplicates you have chosen. At the end, your bat file will contain two lines of text: for /l %%i in (1,1,12) do copy "C:\Path1\test.txt" "C:\Path1\test%%i.txt" "C:\Program Files\Advanced Renamer\arenc.exe" -e "C:\Path2\NewInc.aren" -t files -p C:\Path1\ -m rename To duplicate and rename the files, double-click this new bat file. |