Text output and formatting from the clipboard copyname

Hi,

I'm trying to make a button which will output a textfile containing formatted html to enter onto a website using a folder of jpegs as the source. The aim to avoid having to copy and paste for however many images there are each dir a line of code into the site. The site isself is very simple and for various reasons i'm not using asp, php or perl.

Looking through the FAQ it seems possible but i cant get the output to work. It worked once, i moved on to get it to do more, and hasnt worked again, even with what i thought was the same code that had worked before.

As far as I can tell the following should produce a text file called html.txt contaiing a list of all the JPG filenames in that folder.

SELECT {file$|ext=*.jpg} CLIPBOARD COPYNAMES=nopaths CLIPBOARD PASTE TO FileType=".txt" NEWNAME="html"

Further form this I'd like to prefix each file name with some html (ie <img src="website/path/)then the image name and suffix it with the closing statement. The other thing i need to add is the folder into the path, which wont necissarily be the same name as where the pictures are.

If i'm asking for the moon on a stick please say so and i'll find another route but ultimately the output i'm looking for from say E:/pics01/img_100.jpg would be: .

I think i can work the rest of what i need to do out from there but thats the stumbling block at the moment.

Cheers for any advice.

Adrian[/code]

[Copy IMG links to Clipboard with Width and Height)

I spent at east an hour pouring over searches and the faq and managed to gloss right over it. Should probably sleep rather than try and code. Thanks leo :slight_smile: :blush:

I'm having a couple of problems taking this further. The entire html that needs to be done comprises of a number of arguments which are in " ", and when that's put into 'strUrlPrefix =' it breaks because i'm assuming it sees the following " as the end of its argument.

The entire prefix code i wish to produce is as follows:

<li><a onclick="return showPic(this)" href="photos/

followed by the folder/img output, followed by:

 "><img src="photos/

Then the folder again, then:

/thumbs/

Then the image name again, then:

"></a></li>

Perhaps i'm in a bit over my head with VB, never been a strong point.

Thanks again.

Whoops, forgot to add a complete string using the E:/pics01/img_100.jpg example:

<li><a onclick="return showPic(this)" href="photos/pic01/img_100.jpg"><img src="photos/pocs01/thumbs/img_100.jpg"></a></li>

In VB if you want to put a quote in a string you use two quotes "like ""this""" (which would turn into like "this").

Thanks, but i still cant get it working properly. Even just using an unmodified button doesnt alter what is in the clipboard to anything different. I've tried higlighting the files which gives and error as its attempting to rename the file which alreayd exists and simply selecting/putting focus on the folder doesnt put anything into the clipboard. either when the button runs.

I really have no idea what i'm doing wrong, or more importantly where to begin debugging to find the problem.

Can you post the function you have currently?