I have started using Mathematica to automate file backup operations. The logistics I need make Mathematica a good choice. I am testing and developing the Notebook manually, and
I would like to have an easy way to direct Print output to a separate file, for example, by adding
at the beginning of a Notebook. The advantages of this approach seem obvious. I assume I would need to load my function from a package before calling it. Is something like this this possible? Any suggestions about how to do it?
Alternatively, maybe I could write a print function called
PrintTo that would, on first use, open an output file with the name assigned to
printToFileName, and I could use the editor to change all the
PrintTo functions. Not so fancy, but I think I know how to how to do it.
I think that I answered my own question, in the sense that my alternative idea seems straightforward and pretty implementable.