Does it ask for write permission? There is a security feature that should ask for permission if you use the IO namespace of squirrel.
Have you tried to copy it in the project build options for testing?
Did you not forget to add the
at the beginning and end of the squirrel line? It should exactly look like my code in the forum post.
What version of codeblocks do you use? I think i made some bug fixes in squirrel scripting after the release...
What happens if you paste the line, without
, in the scripting console (view->scripting console) at the bottom line (warning this can overwrite your build log).
While we are at it, would a date and time be possible too (rather than relying on the file properties CreateDate?
you can do this in two ways:
1) Variable expansion:
http://wiki.codeblocks.org/index.php/Variable_expansionAdd
where you want to have the date. For example:
[[IO.CopyFile(_("$(PROJECTNAME)_build_log.html"), _("$(PROJECTNAME)_build_log_") + GetProjectManager().GetActiveProject().GetCurrentlyCompilingTarget().GetTitle() + _("_$(NOW)_") + GetProjectManager().GetActiveProject().GetCurrentlyCompilingTarget().GetCompilerID() + _(".html"), true );]]
Would add the date and time before the compiler id.
2) Using the squirrel function. But this would make the code longer and less readable, so i omit it here... If you want it that way, you can ask and i will try to create something...
I presume this could also be done similarly for one file of type .log or .txt
Squirrel is a full touring complete scripting language. You can do everything with it
Some bindings are missing, but if you need it we can implement it...