The temporary directory is selected using the following algorithm: 1. if $CGITempFile::TMPDIRECTORY is already set, use that 2. if the environment variable TMPDIR exists, use the location indicated. 3. Otherwise try the locations /usr/tmp, /var/tmp, C:\temp, /tmp, /temp, ::Temporary Items, and \WWW_ROOT.