Contents - Index - Previous - Next


TempPath property

 

Applies to

TVCLZip component

 

Declaration

property TempPath: string;

 

Description

By default temporary files are created in the system's directory that is defined by the TEMP environment variable. However, in certain situations you may want to direct temporary files to be created somewhere else.  For instance if you are adding files to a large archive, the modified archive is first created as a temporary file.  As long as everything finishes ok then the original archive is replaced by the temporary archive.  If you do not have enough disk space where your default TEMP directory resides, then you may set the TempPath property to a directory where you do have ample disk space available.  

 

IMPORTANT: As of VCLZip 2.21, if the temporary file is on the same disk as the zip file that you are working with, it will be renamed instead of copied, resulting in faster processing for large zip files.  So, while offloading the TempPath to another disk is necessary if disk space is low, having the TempPath on the same drive as zip files that you are ADDING files to will be faster.  

 

You may set this property in either the Object Inspector or within the source code.

  

Example:  

TempPath := 'd:\mytemp';  /* all temporary files will now be created in d:\mytemp */