gd_putfile

Puts a file on a remote server using GridFTP.

 

Syntax

gd_putfile(host,localfile,remotefile,filetype='ASCII')

 

Description

This command puts a local file upon a remote server using GridFTP. The user must specify the remote server name, the local file path, and the remote file path. The user can also specify the filetype.

 

gd_putfile(host,localfile,remotefile) transfers the ASCII file localfile to the  machine host. The file is saved to the path and file specified by the string remotefile.

 

gd_putfile(host,localfile,remotefile,filetype) as above except the string filetype sets the file transfer type. When filetype = 'ASCII' the file transfer type will be ASCII (this is the default setting), alternatively when filetype = 'binary' the file transfer type is set to binary.

 

Examples

The following command places the local file 'C:/data1.dat' on the remote host 'server' in the users home directory with the file name 'data2.dat'. The file is transferred as a binary file type.

 

from gdcompute import *

gd_putfile('server.domain.com','C:/data1.dat','data2.dat', 'binary')

 

This example behaves as above except the file is placed in the existing subdirectory to the users home directory; 'tmp'.

       

gd_putfile('server.domain.com','C:/data1.dat','tmp/data2.dat', 'binary')

 

This example is similar to the first example except the file is placed in the subdirectory to the root directory; 'tmp'. 

 

gd_putfile('server.domain.com','C:/data1.dat','/tmp/data2.dat','binary')

 

Notes

A valid proxy certificate is required to use GridFTP. Suitable credentials may be required to transfer files to remote servers.

 

See also

gd_getfile, gd_createproxy

 



gd_proxyquery

contents

gd_rmdir

Copyright © 2005, The Geodise Project, University of Southampton