Rename multiple photos in just one click
Moderator: DosItHelp
Rename multiple photos in just one click
hi Sirs,
I'm just a newbie here in batch programming..I just want to ask if there is other formula/code/way to rename the files(Photos) below?because I'm just using REN function to rename all of this files but its not working.
REN jan example number-1001.jpg jan example number.jpg
REN feb example number-1002.jpg jan example number.jpg
REN mar example number-1003.jpg jan example number.jpg
REN apr example number-1004.jpg jan example number.jpg
REN may example number-1005.jpg jan example number.jpg
REN jun example number-1006.jpg jan example number.jpg
REN jul example number-1007.jpg jan example number.jpg
REN aug example number-1008.jpg jan example number.jpg
REN sep example number-1009.jpg jan example number.jpg
REN oct example number-1010.jpg jan example number.jpg
REN nov example number-1011.jpg jan example number.jpg
REN dec example number-1012.jpg jan example number.jpg
REN jan example number-1013.jpg jan example number.jpg
REN feb example number-1014.jpg jan example number.jpg
REN mar example number-1015.jpg jan example number.jpg
REN apr example number-1016.jpg jan example number.jpg
REN may example number-1017.jpg jan example number.jpg
REN jun example number-1018.jpg jan example number.jpg
hope somebody there with a good heart can help me.
Thanks and more power!
I'm just a newbie here in batch programming..I just want to ask if there is other formula/code/way to rename the files(Photos) below?because I'm just using REN function to rename all of this files but its not working.
REN jan example number-1001.jpg jan example number.jpg
REN feb example number-1002.jpg jan example number.jpg
REN mar example number-1003.jpg jan example number.jpg
REN apr example number-1004.jpg jan example number.jpg
REN may example number-1005.jpg jan example number.jpg
REN jun example number-1006.jpg jan example number.jpg
REN jul example number-1007.jpg jan example number.jpg
REN aug example number-1008.jpg jan example number.jpg
REN sep example number-1009.jpg jan example number.jpg
REN oct example number-1010.jpg jan example number.jpg
REN nov example number-1011.jpg jan example number.jpg
REN dec example number-1012.jpg jan example number.jpg
REN jan example number-1013.jpg jan example number.jpg
REN feb example number-1014.jpg jan example number.jpg
REN mar example number-1015.jpg jan example number.jpg
REN apr example number-1016.jpg jan example number.jpg
REN may example number-1017.jpg jan example number.jpg
REN jun example number-1018.jpg jan example number.jpg
hope somebody there with a good heart can help me.
Thanks and more power!
Re: Rename multiple photos in just one click
ka_poroy wrote:hi Sirs,
just want to ask if there is other formula/code/way to rename the files(Photos) below?because I'm just using REN function to rename all of this files but its not working.
REN jan example number-1001.jpg jan example number.jpg
REN feb example number-1002.jpg jan example number.jpg
REN mar example number-1003.jpg jan example number.jpg
REN apr example number-1004.jpg jan example number.jpg
REN may example number-1005.jpg jan example number.jpg
REN jun example number-1006.jpg jan example number.jpg
REN jul example number-1007.jpg jan example number.jpg
REN aug example number-1008.jpg jan example number.jpg
REN sep example number-1009.jpg jan example number.jpg
REN oct example number-1010.jpg jan example number.jpg
REN nov example number-1011.jpg jan example number.jpg
REN dec example number-1012.jpg jan example number.jpg
REN jan example number-1013.jpg jan example number.jpg
REN feb example number-1014.jpg jan example number.jpg
REN mar example number-1015.jpg jan example number.jpg
REN apr example number-1016.jpg jan example number.jpg
REN may example number-1017.jpg jan example number.jpg
REN jun example number-1018.jpg jan example number.jpg
If you have spaces and ampersands then you need double quotes.
REN "jan example number-1001.jpg" "jan example number.jpg"
But you can't rename all those photos to the same name.
Re: Rename multiple photos in just one click
Thanks Sir Foxidrive for the tip.Do you have other batch code to rename these file?just in case if this one not work I still have an alternative.
Sorry I,ve Posted wrong example.
this one is correct.
REN jan example number-1001.jpg jan example number.jpg
REN feb example number-1002.jpg feb example number.jpg
REN mar example number-1003.jpg mar example number.jpg
REN apr example number-1004.jpg apr example number.jpg
REN may example number-1005.jpg may example number.jpg
REN jun example number-1006.jpg jun example number.jpg
REN jul example number-1007.jpg jul example number.jpg
REN aug example number-1008.jpg aug example number.jpg
REN sep example number-1009.jpg sep example number.jpg
REN oct example number-1010.jpg oct example number.jpg
REN nov example number-1011.jpg nov example number.jpg
REN dec example number-1012.jpg dec example number.jpg
Sorry I,ve Posted wrong example.
this one is correct.
REN jan example number-1001.jpg jan example number.jpg
REN feb example number-1002.jpg feb example number.jpg
REN mar example number-1003.jpg mar example number.jpg
REN apr example number-1004.jpg apr example number.jpg
REN may example number-1005.jpg may example number.jpg
REN jun example number-1006.jpg jun example number.jpg
REN jul example number-1007.jpg jul example number.jpg
REN aug example number-1008.jpg aug example number.jpg
REN sep example number-1009.jpg sep example number.jpg
REN oct example number-1010.jpg oct example number.jpg
REN nov example number-1011.jpg nov example number.jpg
REN dec example number-1012.jpg dec example number.jpg
Re: Rename multiple photos in just one click
If you have spaces and ampersands then you need double quotes.
REN "jan example number-1001.jpg" "jan example number.jpg"
Sir, this one is not working also..=(
REN "jan example number-1001.jpg" "jan example number.jpg"
Sir, this one is not working also..=(
Re: Rename multiple photos in just one click
ka_poroy wrote:
REN "jan example number-1001.jpg" "jan example number.jpg"
Sir, this one is not working also..=(
What error do you get?
Re: Rename multiple photos in just one click
It's showing invalid switch - number
and I removed the - sign and replace with space
again error showing
the system cannot find the file specified
and I removed the - sign and replace with space
again error showing
the system cannot find the file specified
Re: Rename multiple photos in just one click
Firstly, you might have a REN.BAT or REN.CMD somewhere in the folder.
Secondly, make sure you have the quotes where I showed you.
Finally, make sure the name is spelled correctly.
Then try it again and tell us how it goes, including any error messages.
I know you want to script this and make it more useful, but get it working with one file to make sure, first.
Secondly, make sure you have the quotes where I showed you.
Finally, make sure the name is spelled correctly.
Then try it again and tell us how it goes, including any error messages.
I know you want to script this and make it more useful, but get it working with one file to make sure, first.
Re: Rename multiple photos in just one click
Why do you need more than one threads: stackoverflow
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: Rename multiple photos in just one click
ka_poroy wrote:It's showing invalid switch - number
and I removed the - sign and replace with space
again error showing
the system cannot find the file specified
http://i.imgur.com/gKXieXZ.png
Re: Rename multiple photos in just one click
thank you sirs for the help!!!especially you sir foxidrive. its ok now.more power!
-
- Posts: 21
- Joined: 19 Jul 2013 11:35
- Location: Brazil
Re: Rename multiple photos in just one click
Hello ka_poroy
I saw your post.
Here in my computer, I applied that one
After rename process:
BEFORE RENAME AFTER RENAME
jan example number-1001.txt-> jan example 1001.jpg
feb example number-1002.txt-> feb example 1002.jpg
mar example number-1003.txt-> mar example 1003.jpg
apr example number-1004.txt-> apr example 1004.jpg
may example number-1005.txt-> may example 1005.jpg
jun example number-1006.txt-> jun example 1006.jpg
jul example number-1007.txt-> jul example 1007.jpg
aug example number-1008.txt-> aug example 1008.jpg
sep example number-1009.txt-> sep example 1009.jpg
oct example number-1010.txt-> oct example 1010.jpg
nov example number-1011.txt-> nov example 1011.jpg
dec example number-1012.txt-> dec example 1012.jpg
Below it goes the script:
I have tested here and it works perfectly.Please test it in your environment and I hope
that it is useful for you.
See you
I saw your post.
Here in my computer, I applied that one
After rename process:
BEFORE RENAME AFTER RENAME
jan example number-1001.txt-> jan example 1001.jpg
feb example number-1002.txt-> feb example 1002.jpg
mar example number-1003.txt-> mar example 1003.jpg
apr example number-1004.txt-> apr example 1004.jpg
may example number-1005.txt-> may example 1005.jpg
jun example number-1006.txt-> jun example 1006.jpg
jul example number-1007.txt-> jul example 1007.jpg
aug example number-1008.txt-> aug example 1008.jpg
sep example number-1009.txt-> sep example 1009.jpg
oct example number-1010.txt-> oct example 1010.jpg
nov example number-1011.txt-> nov example 1011.jpg
dec example number-1012.txt-> dec example 1012.jpg
Below it goes the script:
Code: Select all
@echo off
cls
:: Author: Lima, Rodrigo Sant Anna
:: Date: November 29th,2013
if exist pipeline.txt del pipeline.txt
:: Regular Expression
:: Pattern: ^[a-zA-Z]{3} example number-[0-9]{4}.jpg$
dir /b "??? example number-????.jpg" > pipeline.txt
SETLOCAL EnableDelayedExpansion
For /f "tokens=1,2 delims=-" %%a in (pipeline.txt) do (
set month=%%a
set num=%%b
:: Rename Old Signature to New Signature
ren "%%a-%%b" "!month:~0,3! example !num:~0,4!.jpg"
)
EndLocal
if exist pipeline.txt del pipeline.txt
goto:eof
I have tested here and it works perfectly.Please test it in your environment and I hope
that it is useful for you.
See you
Re: Rename multiple photos in just one click
Thanks rodrigolima for your help