0

My requirement is to get the file from remote machine(Unix) to local machine(Unix/windows). When I run the code in Unix, I am able to download the file from Unix(remote) to Unix(local) but when I run the code Windows, I am not able to get the file from Unix(remote) to Windows(local), I see error message as "Message: 4" for the line channel.get(folderPath + "/" + fileNameFound, localFolder);

why I see issue in windows not in UNIX.

Sravanth Kothuri
  • 211
  • 1
  • 3
  • 11

1 Answers1

0

If I read this code correctly:

channel.get(folderPath + "/" + fileNameFound, localFolder);

then you are building a file path there. File paths are different on Unix and Windows systems. Have you tried using Java's built-in Path class to resolve the file paths?

Also: providing a larger code snippet would make it easier to figure out the problem ;)

sekky
  • 834
  • 7
  • 14