homepage Welcome to WebmasterWorld Guest from 50.17.79.35
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
Forum Library, Charter, Moderator: open

Site Graphics and Multimedia Design Forum

    
I have 200 different photos with different names
I need to keep the names,but replace the images with a single one
rowtc2




msg:3690358
 11:32 am on Jul 4, 2008 (gmt 0)

I have 200 different images with different names.
I want to replace all these 200 images with an unique(single one) image and keep the names unchanged.
Any tips?

 

thecoalman




msg:3690400
 12:10 pm on Jul 4, 2008 (gmt 0)

I can't think of any application that will do that but you could do it with a php script.

You could start reading here:

[us2.php.net...]

That will give you an array which you would want to loop through using this:

[us2.php.net...]

Use this function or similar in the foreach loop to overwrite the files with the new one:

[us2.php.net...]

If you check the notes below you might find some examples that are quite similar or exactly what you want to do.

Probably take you longer than manually doing it but you get to learn something. :)

appi2




msg:3690491
 2:17 pm on Jul 4, 2008 (gmt 0)

If I've got this right, you want to use one image , say fluffycat.jpg and make several copies of that image and rename them according to the names of images in a directory.

Assuming using windows
If so

Put the stuff below the #### into notepad and save it in the directory the images are in to whatever.bat (choose save as type all files)
Also put fluffycat.jpg in that directory
double click on whatever.bat and you should end up with a folder called renamedImages.
Ps I accept no responsibility of this script ;)
backup the images before trying

####

@echo off
setLocal EnableDelayedExpansion

::Puts a list of all images in the directory this script runs into into a file.
dir /B *.jp* > images.txt
dir /B *.gif >> images.txt
dir /B *.psd >> images.txt

echo creating folder
mkdir renamedImages

::Reads each line of the file we just created
for /f "tokens=* delims= " %%a in (images.txt) do (

echo copying image
copy fluffycat.jpeg renamedImages\

echo renaming image to %%a
rename renamedImages\fluffycat.jpeg "%%a"
echo __
)

rowtc2




msg:3690542
 3:35 pm on Jul 4, 2008 (gmt 0)

I have images on my hard disk. I want to change on my computer , not online. I will upload images on server after the modification .I need a software solution like AcdSee (i cannot find a option like that there) or something else.

appi2




msg:3690544
 3:38 pm on Jul 4, 2008 (gmt 0)

erm that .bat file above works on windows xp.

lexipixel




msg:3690550
 3:41 pm on Jul 4, 2008 (gmt 0)

I have images on my hard disk. I want to change on my computer , not online.

What appi2 gave you is a DOS batch file, (whatever.bat).. it should run on your local machine.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved