FtpWebRequest Connecting to an AS/400

前端 未结 4 1574
一整个雨季
一整个雨季 2021-01-25 04:01

I need to download some files via ftp from an old AS/400 server. My code looks more or less like:

FtpWebRequest _request = (FtpWebRequest)WebRequest.Create(\"ft         


        
4条回答
  •  太阳男子
    2021-01-25 04:40

    To make life a little bit easier, the FTP server decides what NameFormat you want to use, based on your first command. If you start with "cd /home", then the FTP server does automatically set NAMEFMT to 1 for you.

    Indeed, you can change this manually during your session with the remote FTP command NAMEFMT. Please, notice that you don't need the (old) iSeries way. You can address EVERY object on the iSeries with NAMEFMT 1. For example, "get /QSYS.LIB/MYLIBRARY.LIB/MYFILE.FILE/MYMEMBER.MBR" will do the trick for any iSeries database table. Even for multimember files!

提交回复
热议问题