Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SysTools 3 (TStFileOperation)

Status
Not open for further replies.

Stretchwickster

Programmer
Apr 30, 2001
1,746
GB
I am attempting to copy and rename files in one smooth operation using TStFileOperation (provided by TurboPower SysTools 3).

In the manual it says it is possible to do this by setting the SourceFiles property to something like this:

Name(Sourcepath & filename)=Value(Destinationpath &filename)
e.g. c:\temp\to.pas=c:\backup\to.bak
c:\temp\tp.pas=c:\backup\tp.bak

I need to do something similar to this but using variables to represent the path and filename. I'm having trouble working out how to add this kind of line to the SourceFiles property.

Is it something similar to this:

SourcePath + SourceFilename = DestPath + 'Backup'

If so, how do i add it to the code rather than the visual property in the Object Inspector
Your help would be much appreciated :)
 
I have managed to get this line working:

SourceFiles.Add(c:\Temp\Config.pas=C:\Backup\Config.bak);

But still can't get it working with variable names instead of explicit names.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top