I'm interested in saving a copy of a script every time I run that script. I suppose that it's a kind of poor-man's version control. I'm varying the script a lot with time, and I'd like to ensure that in the future, when I look over the output from it, I can identify exactly which version I was using.
I have a very ugly way to do it right now, that uses the eval command and the ! syntax to call the DOS? copy command:
CopyName = ['"',ResultsDir,UniqueID,'.txt"']; eval(['!copy MyScript.m ',CopyName])
I suppose that the ideal version would know the filename of the calling script, and not rely on the ! or eval syntax.
Any ideas?
Thanks, Justin
Best Answer