Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

Files in ftp folder

$
0
0
I need to convert this FTP Folder routine to Cobol, can anyone help? Thank you!

FtpWebRequest fwrr = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://" + server + path)); fwrr.Credentials = new NetworkCredential(user,pass); fwrr.Method = WebRequestMethods.Ftp.ListDirectory; StreamReader srr = new StreamReader(fwrr.GetResponse().GetResponseStream()); string str = srr.ReadLine(); List<string> strList = new List<string>(); while (str != null) { strList.Add(str); //strList.Add(string.Format("ftp://{0}/{1}/{2}",server,path,str)); str = srr.ReadLine(); } foreach (var item in strList) { Console.WriteLine(item.ToString()); } Console.ReadLine();

I also need to download a file that is on ftp

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>