Welcome to WebmasterWorld Guest from 54.211.17.91

Forum Moderators: not2easy

Message Too Old, No Replies

I have 200 different photos with different names

I need to keep the names,but replace the images with a single one

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

5+ Year Member



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?
12:10 pm on Jul 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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. :)

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

5+ Year Member



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 __
)

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

5+ Year Member



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.
3:38 pm on Jul 4, 2008 (gmt 0)

5+ Year Member



erm that .bat file above works on windows xp.
3:41 pm on Jul 4, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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.