There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Tech Tips & Tricks
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory modem monitor motherboard netgear network printer problem ram registry repair router slow software sound toshiba trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless xbox
Search
Search for:
Tech Support Guy Forums > General Technology > Tech Tips & Tricks >
Globally altering of over 1k of .jpg file names

Reply  
Thread Tools
dragon5's Avatar
Junior Member with 10 posts.
 
Join Date: Aug 2003
07-Dec-2005, 02:01 PM #1
Globally altering of over 1k of .jpg file names
Hello, I need to add the characters 'tn_' (not the qoutes) to the front of over 1000 .jpg file names. Example:

Current name: picture.jpg, needs to be changed to, tn_picture.jpg.

Each jpg name is unique.

I am looking for a way to do this without having to manually change each and every one.

Any ideas would be appreciated.
Thanks
Tom
Davec's Avatar
Davec has a Photo Album
Distinguished Member with 4,402 posts.
 
Join Date: Jan 2001
Location: Roseburg, OR USA
Experience: Intermediate
07-Dec-2005, 05:09 PM #2
Assuming your filenames are not to long, use the rename command at the command prompt. Move all files to the same directory.

To change sample.jpg and sample2.jpg in the directory c:\temp, the command would be:

rename c:\temp\*.jpg tn_*.jpg

Last edited by Davec; 07-Dec-2005 at 06:26 PM..
dragon5's Avatar
Junior Member with 10 posts.
 
Join Date: Aug 2003
07-Dec-2005, 05:15 PM #3
Thanks, it's been 25 yrears since I did any DOS stuff! I just couldn't remeber the command/syntax.
Tom
JohnWill's Avatar
Computer Specs
Distinguished Member with 110,212 posts.
 
Join Date: Oct 2002
Location: South Eastern PA, USA
Experience: Advanced age & experience
07-Dec-2005, 05:24 PM #4
25 years ago, DOS was not yet around. That came in 1981...
dragon5's Avatar
Junior Member with 10 posts.
 
Join Date: Aug 2003
07-Dec-2005, 06:05 PM #5
Quote:
Originally Posted by JohnWill
25 years ago, DOS was not yet around. That came in 1981...

Sorry, 24 years ago! I think you still got the point! First computer: Radio Shack 2k with cassette drive! Remember Pong?
Stoner's Avatar
Account Disabled with 47,328 posts.
 
Join Date: Oct 2002
Location: Dayton,Oh
07-Dec-2005, 06:21 PM #6
Irfanview can batch rename those, with 'tn' infront of the original name..
floyd11's Avatar
Member with 61 posts.
 
Join Date: Sep 2003
08-Dec-2005, 12:31 PM #7
I use a free program called filerenamer.exe by publicWare. Works great for a number of those type of functions.
Floyd
BanditFlyer's Avatar
Distinguished Member with 12,582 posts.
 
Join Date: Oct 2005
Location: BOT бaHДиT
Experience: (50-6) 44ko, one earlobe
08-Dec-2005, 01:30 PM #8
Quote:
Originally Posted by dragon5
Remember Pong?
I think I'm too young for Pong, but when I was in high school, a video game called Pong-Combat came out that was a spoof of Pong. It used the bloody finishing moves("fatality") from the video game "Mortal Combat" whenever one player lost a pong ball.

I searched and searched for that game on the internet but haven't managed to find it. Anybody else heard of it?
dragon5's Avatar
Junior Member with 10 posts.
 
Join Date: Aug 2003
08-Dec-2005, 06:41 PM #9
Quote:
Originally Posted by floyd11
I use a free program called filerenamer.exe by publicWare. Works great for a number of those type of functions.
Floyd
Thanks, but this program will not keep the original name and just add the prefix 'tn_' to all files.
Tom
dragon5's Avatar
Junior Member with 10 posts.
 
Join Date: Aug 2003
08-Dec-2005, 06:43 PM #10
Quote:
Originally Posted by Stoner
Irfanview can batch rename those, with 'tn' infront of the original name..
All right, I surrender! I can't figure this program? Stoner, how about a little handholding here!
Tom
BanditFlyer's Avatar
Distinguished Member with 12,582 posts.
 
Join Date: Oct 2005
Location: BOT бaHДиT
Experience: (50-6) 44ko, one earlobe
08-Dec-2005, 06:49 PM #11
Tom,

Davec posted a reply that I think was the best solution. BTW, if it was me, I would've downloaded cygwin(a utility to make windows resemble unix) and done a grep command

Have you tried Davec's solution?
Stoner's Avatar
Account Disabled with 47,328 posts.
 
Join Date: Oct 2002
Location: Dayton,Oh
08-Dec-2005, 07:20 PM #12
Quote:
Originally Posted by dragon5
All right, I surrender! I can't figure this program? Stoner, how about a little handholding here!
Tom

Sure thing
Open Irfanview.
File>>batch conversion/rename>>add the .jpg file/files to window>>at botom of current Irfanview window, under name pattern, write in 'tn_$N' and press the start button in the top left corner of that window. You can write over the file, but Irfanview recomends saving the renamed file to a new folder.


I hope that helps.


I'd save to a new folder, for safety's sake
Stoner's Avatar
Account Disabled with 47,328 posts.
 
Join Date: Oct 2002
Location: Dayton,Oh
08-Dec-2005, 07:22 PM #13
Don't forget to chose 'batch rename' _
dragon5's Avatar
Junior Member with 10 posts.
 
Join Date: Aug 2003
08-Dec-2005, 08:32 PM #14
Quote:
Originally Posted by Stoner
Sure thing
Open Irfanview.
File>>batch conversion/rename>>add the .jpg file/files to window>>at botom of current Irfanview window, under name pattern, write in 'tn_$N' and press the start button in the top left corner of that window. You can write over the file, but Irfanview recomends saving the renamed file to a new folder.


I hope that helps.


I'd save to a new folder, for safety's sake

Aaaaahh! Worked perfectly. Thank You! Sometimes hard to see the forest through the trees.
Tom
Stoner's Avatar
Account Disabled with 47,328 posts.
 
Join Date: Oct 2002
Location: Dayton,Oh
08-Dec-2005, 09:16 PM #15
Glad to help
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:02 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.