Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    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:mepswd@funnyserver.us.com \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
    winscp>get /test/testfile/POOL1/test.txt

    Last edited by GaryJSF; 01-29-2013 at 01:48 AM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts