There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash drive driver drivers error ethernet excel freeze games gaming hard drive hardware hdmi internet java laptop malware memory monitor motherboard music network obp printer problem ram random registry router slow software sound trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Solved: How can I batch rename files?

Reply  
Thread Tools
namenotfound's Avatar
Computer Specs
Senior Member with 3,003 posts.
 
Join Date: Apr 2005
Location: New York
Experience: no man can be my equal
07-Sep-2008, 08:07 AM #1
Solved: How can I batch rename files?
Let's say I have a folder, and in that folder are a bunch of pictures. Let's now say I want to rename then as 1.jpg, 2.jpg, 3.jpg, etc. how can I do this? Right now I'm renaming one-by-one, but would prefer a better method.
__________________
404: Name Not Found
Don't PM me questions, that's what posts are for
My Favorite Editors: Windows: Crimson Editor | Mac: Fraise | Linux: gPHPEdit
xgerryx's Avatar
Senior Member with 4,179 posts.
 
Join Date: May 2003
Location: New Zealand
Experience: "No threat to Einstein"
07-Sep-2008, 08:30 AM #2
Download a small program called irfanview, http://www.irfanview.com/main_download_engl.htm it is brilliant . If you need help with it get this thread moved to "Digital Photography & Imaging" and one of us will give you a hand.
namenotfound's Avatar
Computer Specs
Senior Member with 3,003 posts.
 
Join Date: Apr 2005
Location: New York
Experience: no man can be my equal
07-Sep-2008, 08:40 AM #3
That's a Windows app, I'm on Linux...

Isn't there a simple terminal command that can do this?
xgerryx's Avatar
Senior Member with 4,179 posts.
 
Join Date: May 2003
Location: New Zealand
Experience: "No threat to Einstein"
07-Sep-2008, 08:44 AM #4
Quote:
Originally Posted by namenotfound View Post
That's a Windows app, I'm on Linux...
Sorry about that. Getting late at night down here in NZ
avisitor's Avatar
Computer Specs
Senior Member with 1,712 posts.
 
Join Date: Jul 2008
Location: Chicago, IL
Experience: Advanced
07-Sep-2008, 07:07 PM #5
Lifting from here

Code:
#! /bin/bash

x=0
for fname in *.png
do
  mv $fname `printf "%03x.png" $x`
  x=$(($x+1))
done
Which I believe counts in HEX, but you're free to change that to DEC.
briealeida's Avatar
Computer Specs
Senior Member with 677 posts.
 
Join Date: Jun 2007
Location: US and A
Experience: Ninja
09-Sep-2008, 02:42 PM #6
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 07:37 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.