I want to perform a remote copy of data from a remote HP-UX server to my local file system using the sshj library.
The data on this remote server has the form: DATA_<YEAR>.dat
. For example:
DATA_1998.dat
DATA_1999.dat
DATA_2000.dat
DATA_2001.dat
DATA_2002.dat
The specific method I'm using is the following:
SSHClient.newSCPFileTransfer().download(String remotePath, LocalDestFile localFile)
Given a starting and ending year (i.e. 1991
and 2001
), how can I construct a String
to pass as the remotePath
parameter to copy the range of files between the given start and end years?