COPYFILE (Update Rollup 1.0 for Windows XP Embedded)
5/10/2007
This command copies an existing file to a new file.
Syntax
7, [ErrorMode], [ExpandMode], SrcFilePath, [ExpandMode],
DstFilePath, [FailIfExists]
Parameters
ErrorMode
Optional. Specified as a decimal representation of a hexadecimal bitmask. Values must be specified in decimal format. The following table shows the possible values.Value Name Description 0 (0xnnnn0000)
DAERH_ABORT
Default. The abort-on-error mode stops the command file from processing further.
32768 (0xnnnn8000)
DAERH_IGNORE
The ignore-on-error mode continues by processing the next command when an error occurs.
32769-33023 (0x000080xx where xx!=00 is the number of retries)
DAERH_RETRY_WITHIGNORE
The retry-on-error with ignore mode retries the offending command up to 255 times. If the number of retries exceeds the retry count, this mode continues processing the next command.
1-255(0x00xx where xx!=0 is the number of retries from 1-255)
DAERH_RETRY_WITHABORT
The retry-on-error with abort mode retries the offending command up to 255 times. If the number of retries exceeds the retry count, the command file processing halts.
65536 – 4294901760(0xFFFFnnnn where FFFF is the delay mask in seconds)
DAERH_DELAYMASK
The delay error mode value is added to either the DAERH_RETRY_WITHIGNORE or the DAERH_RETRY_WITHABORT value to cause a delay between retries. This value is in seconds and has a range between 1 and 65535.
Note
Parsing errors, especially the passing of not valid command parameters, generates an error in DAERH_ABORT error mode. With logging enabled, an appropriate error message is output to the log file.
ExpandMode
Optional. Specifies if the string that follows it is an environment variable that should be expanded. Can occur multiple times with this command. The following table shows the possible values.Value Description 0
Does not expand the string.
1
Device Update Agent expands the string on the embedded device.
2
Device Update Agent script compiler expands the string on the developer computer.
- SrcFilePath
String that specifies the name of an existing file.
- DstFilePath
String that specifies the name of the new file.
FailIfExists
Optional. The following table shows the possible values.Value Name Description 0
DANO
If new file already exists, the command overwrites the existing file and succeeds.
1
DAYES
If the new file already exists, the command fails.
Remarks
For more information, see the Microsoft Windows SDK documentation at this Microsoft Web site.
Example
The following example shows typical use.
//
// CopyFile
//
COPYFILE,,,c:\dua_temp\dua-log.txt,,c:\dua_temp\child\dua-log.txt,DANO