Skip to content

TSTool / Command / Copy


The Copy command creates a copy of an existing time series, assigning an alias to the result. The copy is an exact copy except that the alias is different (the TSID must also specified and should be defined to be unique). The alias can then be used for further time series manipulation. A copy of a time series is useful when data filling or other manipulation will occur and time series that is unique from the original is needed. For example, if adding two time series, a copy of one time series can be made, and the second time series added to the copy – this ensures that there is not confusion with the original time series. Parameters are available to control how much of the original data are copied.

Command Editor

The following dialog is used to edit the command and illustrates the command syntax.


Copy Command Editor (see also the full-size image)

Command Syntax

The command syntax is as follows:


The following older command syntax is updated to the above syntax when a command file is read:

TS Alias = Copy(Parameter=Value,...)

Command Parameters

Parameter                       Description Default                          
The time series identifier or alias of the time series to copy. The time series will be found by searching backwards from the copy command. Can be specified using processor ${Property}. None - must be specified.
NewTSID A new time series identifier to assign to the copy. This is useful to avoid confusion with the original time series. Use the Edit button to edit the time series identifier parts. The data interval must match that of the original time series. Can be specified using processor ${Property}. Copy the original time series TSID. If NewTSID is specified but does not have a valid interval, copy the interval from TSID. The default cannot be determined if an alias is used for the input time series.
The alias to assign to the time series, as a literal string or using the special formatting characters listed by the command editor. The alias is a short identifier used by other commands to locate time series for processing, as an alternative to the time series identifier (TSID). Can be specified using processor ${Property}. None - must be specified.
CopyDataFlags Indicates whether data flags are copied. Specify as False or True. True
CopyHistory Indicates whether the time series manipulation history is copied. Specify as False or True. True


See the automated tests.

An example command file to read a time series from the HydroBase database and make a copy is as follows:



See Also