The TransactFileToServer function allows a file to be transferred to the server.
Syntax | |||||
TransactFileToServer(SourceFile [, DestFile] [, AlwaysTransact] [, CreateDirectory]) | |||||
Return value | |||||
Type |
Description | ||||
Long |
0 if the function could be successfully executed | ||||
Parameter | |||||
Use |
Name |
Type |
Passing |
Description | |
Required |
SourceFile |
String |
ByVal |
Path to the file to be transported to the client. Wildcards are not allowed. Predefined directories are supported. | |
Optional |
DestFile |
String |
ByVal |
Path to the file at the client. See Note. | |
Optional |
AlwaysTransact |
Boolean |
ByVal |
Overwrite file if already available (default=False) | |
Optional |
CreateDirectory |
Boolean |
ByVal |
Create directories with the client if required (default=True) | |
SourceFile contains a path to the file to be transferred to the server.
DestFile contains a path where you want to place the file on the server.
AlwaysTransact determines whether the file should always be overwritten even if it is already on the server.
CreateDirectory determines if the necessary directories should be created at the server.
Note
The function supports predefined directories:
Begriff |
Description |
[TMPDIR] |
Current temp directory at the client or server The directory is often located in the user directory, e.g. C:\Users\Benutzer.Domäne\AppData\Local\Temp |
[APPDIR] |
The TCE program directory at the client or server, often C:\Program Files (x86)\TAP.CON\TCE |
[WINDIR] |
The Windows directory at the client or server, often C:\Windows |
[SYSDIR] |
The system directory at the client or server, often C:\Windows\System32 |
[APPDATADIR] |
The application data directory at the client or server, e.g. C:\Users\Benutzer.Domäne\AppData\Roaming |
[PROGDATADIR] |
The program data directory at the client or server, e.g. C:\ProgramData |
Return of the function is 0 on success or the error code of the transfer.