web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AX2009 get Filenames from FTP-Server with FtpWebRequest (NLIST)

(0) ShareShare
ReportReport
Posted on by 140

Hi,

is it not possible to use FtpWebRequest with NLIST ?

If i use  "FtpWebRequest..set_Method("NLIST");" i got error that this method is not possible.
LIST works, but the i got details, and not only the filename:

Info FTP-FileList drwxrwxrwx   1 user     group           0 Apr 24 17:28 .
Info FTP-FileList drwxrwxrwx   1 user     group           0 Apr 24 17:21 ..
Info FTP-FileList -rw-rw-rw-   1 user     group   253555565 Feb 18  2011 Backup_manuell_2011_02_18.zip
Info FTP-FileList drwxrwxrwx   1 user     group           0 Apr 24 17:28 tmp
Info FTP-FileList 226 Transfer ok.

But I only want the filename  from ftp-directory to download the file.

Is it possbile to get only filname with System.Net.FtpWebRequest  in AX-Code?

Best regards
Michael

 

 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Ian Feetenby Profile Picture
    290 on at

    I think you need to use NLST rather than NLIST.

    Best wishes

    Ian

  • Michael N Profile Picture
    140 on at

    Yes, NLST works.

    I  found only NLIST

    ListDirectory  = Represents the FTP NLIST protocol method that gets a short listing of the files on an FTP server.

    (msdn.microsoft.com/.../system.net.webrequestmethods.ftp_fields(v=vs.100).aspx)

    Thanks

    Michael

  • Ian Feetenby Profile Picture
    290 on at

    I think it may be a case of a spelling mistake on the Microsoft site.

    Regards

    Ian

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans