locked
Batch file code required. RRS feed

  • Question

  • I need to write a batch file to download files from MBOX file-share server provided by my client. 

    I have written a sample file, that establishes the connection through my command prompt to the MBOX file server on the web and list the directories present.

    Here is the code for the mboxscript.bat file :


    set PATH=%PATH%;C:\Program Files\Putty
    psftp.exe -i "c:\program files\putty\userid-pri.ppk" userid@mboxnaprd.jnj.com -b "C:\Data\batch.txt"



    Here is the code for the Batch.Txt

    dir
    bye


    This is a sample of the output obtained in the command prompt.
    psftp> 
    psftp> dir
    JANUS_BSS01  JANUS_JANUS
    psftp> bye


    Now how can I change this code to look for available files on the server and download them.

    I am an absolute newbie to batch processing. this is my first batch file till date.

    Please help me out.
    • Moved by KJian_ Monday, August 24, 2009 1:25 PM (From:.NET Framework inside SQL Server)
    Wednesday, August 19, 2009 1:28 PM

Answers