....do I need to amend the script slightly?

Yes. In my example I use the variable $appdata. It gets filled earlier in the script with the contents of the environment variable %appdata%. In your script $appdata is not filled. You can use environment variables directly in kix but I prefer to always use them in a kix style variable.
Here is how I fill $appdata with the correct data.
It puts the contents of %appdata% into $appdata. If you don’t do this then the variable $appdata will be empty and deleting the file will fail. No big deal for the people that do not have issues but it also does not fix it for those who have the “Save as...” issue. It does not throw an error and stop because it is correct kix syntax but it will give you an error code and description when looking at @error and @serror.
Edited by Mart (2011-04-04 04:56 PM)
_________________________
Mart
- Chuck Norris once sold ebay to ebay on ebay.