GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   rename multiple files under linux (https://gfy.com/showthread.php?t=516311)

alex79 09-14-2005 08:45 AM

rename multiple files under linux
 
how can i rename 1k files from xx.jpg in xx.gif from the command line?

Adult Site Traffic 09-14-2005 08:51 AM

I have a custom piece of code that's run from the command line. It's a pain in the ass.

I have to move it to the folder I want to make the changes in and it won't do sub folders. I have to re-code it with any different variable that I want to change and then upload it, then run it from the box.

If you want it I'll try to find it.

Otherwise I have one that runs locally that will search/replace anything in any string on 1,000 files in 2 seconds.

LMK and I will try to help you.
.

mrkris 09-14-2005 08:54 AM

bash$ man find
Take a look at -exec or create a shell script

AgentCash 09-14-2005 09:14 AM

for i in *; do echo mv $i "`echo $i | tr .jpg .gif `"; done | bash


All times are GMT -7. The time now is 01:01 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123