Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
01-29-2013, 12:34 AM #1
- Join Date
- Jul 2012
- Thanked 0 Times in 0 Posts
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
Last edited by GaryJSF; 01-29-2013 at 12:48 AM.