Script kiddies: Is there something which can perform this boring task

Soldato
Joined
27 Dec 2006
Posts
2,916
Location
Northampton
I need to update a text file for my website. The code is below:

Code:
<image>
		<thumb_path>test1/thumbs/2.jpg</thumb_path>
		<big_image_path>test1/images/2.jpg</big_image_path>
		<description>test image 2</description>
		
	</image>

What I want is for the changes to be done below but in sequence

Code:
<image>
		<thumb_path>test1/thumbs/2.jpg</thumb_path>
		<big_image_path>test1/images/2.jpg</big_image_path>
		<description>Image 2</description>
		
	</image>

<image>
		<thumb_path>test1/thumbs/3.jpg</thumb_path>
		<big_image_path>test1/images/3.jpg</big_image_path>
		<description>Image 3</description>
		
	</image>
 
Is that the only thing that will be in the file?

if so i can probably knock some command line thing up to do it for you.

yes please, i'm also finished with the first XML file but in future I will need a script command that will help me do this effortless and also reduce any errors

If it is literally just removing the "test image" and replacing it with "Image" in the description tag, then you can do that in Notepad, using the Find & Replace:

Find:

<description>test image

Replace:

<description>Image

No, not quite. From my OP, Images are sequenced i.e.

Code:
<image>
		<thumb_path>test1/thumbs/1.jpg</thumb_path>
		<big_image_path>test1/images/1.jpg</big_image_path>
		<description>Image 1</description>
		
	</image>

	
    <image>
		<thumb_path>test1/thumbs/2.jpg</thumb_path>
		<big_image_path>test1/images/2.jpg</big_image_path>
		<description>Image 2</description>
		
	</image>


    <image>
		<thumb_path>test1/thumbs/3.jpg</thumb_path>
		<big_image_path>test1/images/3.jpg</big_image_path>
		<description>Image 3</description>
		
	</image>

This will keep on going all the way to 200!
 
yeah, just run it, cmd prompt will pop up, then just enter what it asks for :)

I'm getting this error.

79816562.jpg


I'm using Windows 7 64-bit

EDIT: Well the same error message not the title, ignore that.
 
hmm, looks like i need to learn how to use visual studio ;).

you can either use one of the solutions by other people, or i can just upload a txt file with how ever many images you want done.

now to figure out how to compile stuff in vs without needing stuff that comes with vs :D.

Thanks for your help though, i'll look into the other methods and see which one can be used.
 
Back
Top Bottom