After my testing with scripting, I have dozens of dozens of scrXXXX.tmp files in the "Heroes of Might and Magic 2 GOLD" folder.
I think it would be better to generate them in a specific folder, and to delete them automaticaly when they are no more usefull.