How Do I Read and Write Files from/to the System’s Temporary Directory? (Magic xpa 2.x)
The Windows operating system has a temporary directory set up by default, which is used by many applications for writing “scratch” files, generally under C:\Documents and Settings. This is a good place to write intermediate files that are intended for, say, importing into another product. You can easily access this directory using the %TempDir% logical name.
In this example, we are creating a text file that will be read into Excel. If we did not specify a path name, the temporary file would be created in our working directory. By adding the internally-defined logical name %TempDir%, we force Magic xpa to use the system's temporary directory instead.