# ExportString and HTML: where are saved images?

I want to use ExportString to generate HTML expression. Here is an easy example:

ExportString[x^3, "HTML", "FullDocument" -> False]


gives

<p class="Output">
</p>


I cannot find the folder HTMLFiles and related file gif. I tried setting the working directory, or looking in any folder of the computer, without having success. My guess is that files are not actually generated. But the point is: ExportString is not useful at all for HTML format. Please, help, any comment is welcome.

Finally I get the answer: it's the temporary folder kept by $TemporaryDirectory. It was very hard to discover it because the folder HTMLFiles is istantaneously removed after the images are generated. In order to discover it, I created the folder HTMLFiles in my$TempDirectory and then changed the folder's permission so it was not possible to delete it. Doing so I had the confirmation that this is the position where ExportString creates the temporary images.

Now, the question is another one: if I want to use ExportString to get an HTML convertion of a notebook so to embed it into some other html code, how I can avoid that images are destroyed? In other words, if I have to convert a whole notebook (with many plots and expressions in TraditionalForm) by program (not by hand), and for other reasons I need ExportString and not Export, how to resolve the images issue?

• I converted your self-answer to an edit because it primarily introduces a new question. I hope this will help you get the answer you seek. – Mr.Wizard Apr 15 '15 at 15:35
• @Mr.Wizard: thanks for that, surely it helps making the thread more clear. – bobknight Apr 15 '15 at 18:58

I searched my entire system for that folder and couldn't find it. Of course there is always Export that can put the files at a location of our choosing, I'm not sure what the downside is:
Export["~/Desktop/", x^3, "HTML", "FullDocument" -> False]