Rename a unique name for same images

Bulk Rename Utility How-To's

Rename a unique name for same images

Postby dataplumber » Tue May 05, 2020 6:26 pm

Is there a way to duplicate an image with two or more unique names?

I have a single image that represents 5 different product skus
prod1
prod2
prod3
prod4
prod5

I would like top bulk rename the single image into 5 different files names after each sku.
Can this be done quickly?
dataplumber
 
Posts: 1
Joined: Tue May 05, 2020 5:51 pm

Re: Rename a unique name for same images

Postby therube » Tue May 05, 2020 7:28 pm

(just rambling...)

if you don't need physical copies, creating links could be better
(quicker & space saving)


if you copy a file, then paste it, repeatedly (say, four more times) [through Windows Explorer, or elsewere], it will create multiple copies of the file


UNIX-like cp (copy) command can copy a source file to a different named file, & if you ran that in a loop (say, four times), it can also auto-increment the (copied) file name
Code: Select all
cp.exe   xxx   prod1  --backup=numbered

Code: Select all
05/05/2020  02:21 PM           583,373 prod1
05/05/2020  02:21 PM           583,373 prod1.~1~
05/05/2020  02:21 PM           583,373 prod1.~2~
05/05/2020  02:21 PM           583,373 prod1.~3~
05/05/2020  02:21 PM           583,373 prod1.~4~
11/19/2019  04:52 PM           583,373 xxx



similarly you could use UNIX-like ln (link, mklink) command to make links of a named file
Code: Select all
ln.exe   xxx   xxx1

Code: Select all
11/19/2019  04:52 PM           583,373 xxx
11/19/2019  04:52 PM           583,373 xxx1
11/19/2019  04:52 PM           583,373 xxx2
11/19/2019  04:52 PM           583,373 xxx3
11/19/2019  04:52 PM           583,373 xxx4


(copy & link commands themselves can make the multiple copies like this, directly, but if you run them through a loop... [in a batch file, something like... for i = 1 to 4; do execute_command; next i; done])


Some ideas from elsewhere (Unix/Windows):https://unix.stackexchange.com/questions/291065/duplicate-file-x-times-in-command-shellhttps://stackoverflow.com/questions/25293670/windows-batch-file-to-make-multiple-copies-of-a-single-file-with-each-copy-bein
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm


Return to How-To