title: Transfer Files With Directory To SFTP Server Using Jsch
body: <p>I am attempting to move files from my local machine to remote server. But i am unable to do it with JSch api.</p>
  
  <pre><code>for (File f : fileList) {
      channelSftp.put(new FileInputStream(f), "/ROOT/File/"+f.getName());
  }
  </code></pre>
  
  <p>i am looping my local machine directory /Home/File/file1.txt, file2,txt file3.txt and so on and save it to fileList.</p>
  
  <p>I need to transfer these files to different directory in SFTP server.
  say /ROOT/File/file1.txt, file2,txt file3.txt.</p>
  
  <p>I do not know how to change /Home to /ROOT file path name. and also i need to copy all files without use sftpChannel.mkdir(folder); [create folder one by one] in JSch.</p>