run DOS command for WinSCP from Java
I am trying to have my java program connect using WINSCP to a unix machine a pull a file. I have been testing it out and the commands run from the DOS prompt but not when I try to run them from java. Any help? I changed the values as to not post private information.
String dosCommandCon = "cmd /c" + " cd \"C:\\temp\\\" \n" +
"\"C:\\Program Files (x86)\\WinSCP\\WinSCP\" meuser:firstname.lastname@example.org \n get /test/testfile/POOL1/test.txt\n bye\n" ;
so from DOS:
C:\temp>"C:\Program Files (x86)\WinSCP\WinSCP" meuser:mepswd @funnyserver.us.com