Search code examples
genexus

How to Delete and List files with SFTP


is there a way to be able to interact with an SFTP server to perform these two operations:

  • Delete a file from the server
  • List the files that are in a folder on the server

Within the documentation I do not see these functionalities:

https://wiki.genexus.com/commwiki/servlet/wiki?44965,GeneXus+SFTP+Module https://wiki.genexus.com/commwiki/servlet/wiki?44966,SFTP+Client

I am working with GX 17 U9, c#


Solution

  • Reading the GxWiki there is a warning about the use of this module. I think you have two options:

    1. Develop an external object with a standard library.
    2. Use some command line tool like you could see here https://soic.iupui.edu/technology/kb/sftp/

    If you want to do the second way, you can use the shell command: https://wiki.genexus.com/commwiki/servlet/wiki?8502,Shell%20function