Mourning the loss of our friend, WhitPhil.
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 audio black screen blue screen boot bsod connection crash dell desktop driver drivers dvd email error excel firefox hard drive hardware hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem ram recovery router safe mode screen slow sound spyware trojan upgrade vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Solved: How can I batch rename files?

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
namenotfound's Avatar
Computer Specs
Distinguished Member with 2,546 posts.
 
Join Date: Apr 2005
Location: New York
Experience: no man can be my equal
07-Sep-2008, 07: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: Smultron | Linux: gPHPEdit
xgerryx's Avatar
Distinguished Member with 4,086 posts.
 
Join Date: May 2003
Location: New Zealand
Experience: "No threat to Einstein"
07-Sep-2008, 07: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
Distinguished Member with 2,546 posts.
 
Join Date: Apr 2005
Location: New York
Experience: no man can be my equal
07-Sep-2008, 07: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
Distinguished Member with 4,086 posts.
 
Join Date: May 2003
Location: New Zealand
Experience: "No threat to Einstein"
07-Sep-2008, 07: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,628 posts.
 
Join Date: Jul 2008
Location: Chicago, IL
Experience: Advanced
07-Sep-2008, 06: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 660 posts.
 
Join Date: Jun 2007
Location: US and A
Experience: Ninja
09-Sep-2008, 01:42 PM #6
This may also be of use to you:
http://www.debian-administration.org/articles/150
Closed Thread Bookmark and Share

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.

Smart Search

Find your solution!



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


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 06:41 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.