Hi Peter,
I did not test the script I wrote actually and I can tell you why the script
runs into an error.
.delete() is also a javascript method on an object. It will delete a property
by the name you specify. As you clearly want to call the delete method on the
file you need to use the work
Hi Peter,
It's not flowscript, but I believe one can also use the source-writing
transformer to delete xml files from the filesystem:
...
context://doc/editable/my.xml
...
One can insert the exact filename via a sitemap parameter/xslt variable earlier
in the chain, then
Solved
I found the answer at
http://markmail.org/message/7psype56uhu5kbad#query:+page:1+mid:ezqkl6i255bjdw75+state:results
I amended file.delete(); to:
file["delete"]();
and it works, the file is deleted. However, I don't know why it works
Thank you all for your help
Peter
On 29/12/2012
Hi Peter,
file.delete() doesn't get executed in this case.
Its:
if (!file.exists()) {
throw new FileNotFoundException(filePath);
that line of code that triggers your Error message and file.delete() has
not been reached.
Greetings,
Greg
2012/12/29 Peter Sparkes
> Hi Martin an