gcharles
13th May 2002, 11:10
hi,
I would like to transfer a file from a unix server to a windows PC
as soon as he's created. Does anyone write a script doing that ?
thanks for your help.

gwen

NPRao
13th May 2002, 11:53
Hi Gwen,

You can use this function -

Syntax

long server2client( string source, string dest, long text.mode, [long progress.window] )

Description

This copies a specified file from the server to the client. The function supports long file names.

Arguments

source The source file name, on the server.
dest The destination file name, on the client.
text.mode This is a boolean value that specifies whether the file is to be copied in text or binary mode:<>0 text mode
0 binary mode
progress.window Use this optional argument to specify whether a progress indicator must be displayed to indicate the progress of the copy action:<>0 progress indicator is displayed
0 progress indicator is not displayed
Notes

In order to use a progress indicator, you must first create it with create.progress.indicator(). You then use change.progress.indicator() to change its value. If you specify the PROGRESS.STOP and/or PROGRESS.CANCEL modes when creating the indicator, the user can stop or cancel the copy operation before it has completed. In both cases, the destination file is deleted.

Return values

0 success
1 error; process canceled by the user
<0 error; source file not copied to the destination file

Example

server2client( bse.tmp.dir$() & "/test1.txt", "C:\Program Files\Test.txt",
false, false )

Context

ttdllbw library function.

gcharles
13th May 2002, 16:04
it works very well,
thanks for your help NPRao