Dear Wiki user, You have subscribed to a wiki page or wiki category on "Commons Wiki" for change notification.
The following page has been changed by KenTanaka: http://wiki.apache.org/jakarta-commons/SimpleSftpFileDownload ------------------------------------------------------------------------------ This is a basic example to use VFS to retrieve files from a remote system using the SFTP protocol. Files matching a specified regular expression are retrieved. = Example Configuration = - For the purposes of this example the remote system is named "'''sftpremote.example.com'''". The files that will be retrieved are in a directory named '''/data/source/fires''' and the files are named '''smoke'''''!YearMoDy'''''_wkt.txt'''. The data file for March 25, 2008 is named "smoke20080325_wkt.txt". + For the purposes of this example the remote system is named "'''sftpremote.example.com'''". The files to be retrieved are in a directory named '''/data/source/fires''' and the files are named '''smoke'''''!YearMoDy'''''_wkt.txt'''. Thus the data file for March 25, 2008 is named "smoke20080325_wkt.txt". The downloaded files will be received in the local directory '''/extra/data/fires/smoke'''. Connect to the remote sftpremote.example.com system using the login "smokey" and password "bear". = Key Concepts = - Access to a remote system using SFTP uses the SSH secure shell protocols. Although the behavior is similar to FTP, it is ''not'' FTP run over a secure connection. So there are some differences between FTP and SFTP that should be noted. One of these it the lack of the FTP binary/ASCII transfer mode, in SFTP all transfers are binary as if they were executed with an "scp" (secure copy) command. + Access to a remote system using SFTP uses the SSH secure shell protocol. Although the behavior is similar to FTP, it is ''not'' FTP run over a secure connection. There are some differences between FTP and SFTP that should be noted. One of these it the lack of the FTP binary/ASCII transfer mode, in SFTP all transfers are binary as if they were executed with an "scp" (secure copy) command. This example code uses a regular expression to match files on the remote system, so that not all of the files in the source directory are transferred. The {{{filePatternString}}} is set to ".*/smoke\\d{8}_wkt\\.txt". This has the regular expression components of: * ".*/" matches any path that precedes the filename. The "." is wildcard character, "*" specifies that 0 or more of these may be present. The "/" matches the directory separator. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]