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)
-   -   I need a script to batch rename files on a server (https://gfy.com/showthread.php?t=327187)

jovigirl 07-17-2004 12:49 AM

I need a script to batch rename files on a server
 
Sth like rename it! but server side done.
Anyone knows of any?
Thanks guys

tyler86ed 07-17-2004 12:50 AM

Maybe a few more details...did you use the *

jovigirl 07-17-2004 12:57 AM

I need sth like rename all files in this directory to
(some_prefix_I_choose)001.ext
(some_prefix_I_choose)002.ext
(some_prefix_I_choose)003.ext
(some_prefix_I_choose)004.ext
etc

tyler86ed 07-17-2004 01:03 AM

rn *.ext

will change all files with that extension in the dir.

MaDalton 07-17-2004 01:13 AM

Total Commander does batch rename via ftp

toddler 07-17-2004 01:19 AM

Quote:

Originally posted by tyler86ed
rn *.ext

will change all files with that extension in the dir.

huh? on what OS is that?

skillfull 07-17-2004 01:41 AM

Quote:

Originally posted by toddler
huh? on what OS is that?
ever heard of Unix ?

sixxxth_sense 07-17-2004 01:43 AM

Quote:

Originally posted by skillfull
ever heard of Unix ?
LOL :1orglaugh

jovigirl 07-17-2004 02:03 AM

Quote:

Originally posted by MaDalton
Total Commander does batch rename via ftp
This is cool :thumbsup

SSH is far too complicated to batch rename a lot of images in different directories.

Ash@phpFX 07-17-2004 02:52 AM

easy done with php

spentrent 07-17-2004 04:48 AM

Quote:

Originally posted by asher
easy done with php
...but only if you're the type who likes using sledgehammers on thumbtacks.

If you're on the bash command-line of your linux/bsd/unix host (which you probably are), do this:

Code:

$ cd /the/directory/where/my/files/are

$ for i in *    [hit enter]
do              [hit enter]
mv $i prefix$i  [hit enter]
done            [hit enter]



All times are GMT -7. The time now is 07:51 AM.

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