Transferring a file

Top  Previous  Next

Once you have established a connection to the source and destination FTP servers you may transfer a file using the Fxp#transfer method.  If you wish to change the source or destination directory you can do so using the Ftp#setDir method for the desired Ftp instance prior to invoking the Fxp#transfer method.

 

Example

 

// set source directory of Ftp instance

source.setDir("/src");

 

// set destination directory of Ftp instance

destination.setDir("/dest");

 

// create new Fxp instance

Fxp fxp = new Fxp();

 

// transfer file "filename.txt" from source to destination

fxp.transfer(source,destination,"filename.txt");

 

See also

 

Establishing a connection

Transferring a directory





Home | Company | Products | Solutions | Purchase | Support | Services | Blog

© 2021 JSCAPE LLC