That looks nice. Thanks, John! Best, Zhenjiang On Mon, Jun 2, 2014 at 8:00 PM, John Kitchin wrote: > there is no builtin way to do this that I know of. I do this in publishing > blogposts from org-mode. i use a filter on links that does this. The > copying code is here: > > https://github.com/jkitchin/jmax/blob/master/user/blogofile.el#L115 > > the results of that code can be seen at http://kitchingroup.cheme.cmu.edu. > I wrote about doing some of this here: > http://kitchingroup.cheme.cmu.edu/blog/2013/09/28/Changing-links-to-files-so-they-work-in-a-blog/ > > It may not be what you want, but it might help you build your code. I hope > it helps! > > John > > ----------------------------------- > John Kitchin > Associate Professor > Doherty Hall A207F > Department of Chemical Engineering > Carnegie Mellon University > Pittsburgh, PA 15213 > 412-268-7803 > http://kitchingroup.cheme.cmu.edu > > > > On Mon, Jun 2, 2014 at 7:23 PM, zhenjiang zech xu > wrote: > >> Hi orgmoders, >> >> Is there any existing function to copy files in the external links to a >> specified location when exporting .org file to html? I know org-publish has >> functionality to copy files with certain suffices on defined project, but >> my need is to export single file or single subtree in the buffer. >> >> For example, when I export the following subtree, it would be lovely to >> copy the spam.png to the path I set up. >> * foo >> [[file:spam.png]] >> >> If there is no function ready to do that, what is the easiest easy to >> implement it? any point to the right direction is appreciated. >> >> Thanks, >> Zhenjiang >> > >