IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

how to list directories in Flow-Service?

  • 1.  how to list directories in Flow-Service?

    Posted Wed February 24, 2016 06:06 AM

    Hi all!

    How can i list folders of a directory? I want something like listFiles, but for directories?

    Must is wrote my own Java-Service todo so?

    Thx


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 2.  RE: how to list directories in Flow-Service?

    Posted Wed February 24, 2016 11:03 AM

    Yes you may have to end up with Java Service only list files in a folder/directory with the out of box services as far I am aware of :frowning:

    HTH,
    RMG


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 3.  RE: how to list directories in Flow-Service?

    Posted Wed February 24, 2016 11:07 AM

    ok. I start with my Java-Service. Maybe somebody has a nother option for me :slight_smile:


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: how to list directories in Flow-Service?

    Posted Wed February 24, 2016 12:46 PM

    For now java service is a good option (as we have developed one as our project common utilities) but you can raise a feature request on SAG brainstorm.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: how to list directories in Flow-Service?

    Posted Wed February 24, 2016 02:51 PM


  • 6.  RE: how to list directories in Flow-Service?

    Posted Sun February 28, 2016 08:41 AM

    I remember a service listFiles as part of PSUtilities pkg, better try to get it.

    Thanks,


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 7.  RE: how to list directories in Flow-Service?

    Posted Sun February 28, 2016 01:21 PM

    Unfortunately it does not list sub directories under a folder.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: how to list directories in Flow-Service?

    Posted Mon April 18, 2016 04:41 PM

    pub.utils:executeOSCommand
    If there is a equivalent Unix command, you can pass on the Unix command in this service.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 9.  RE: how to list directories in Flow-Service?

    Posted Tue April 19, 2016 03:46 AM

    It depends how you going to design and purpose, I’m not sure this optional way will be working for you if you not creating Java service,

    1. you can try to create the ftp to the location you want to see or list the file,
    2. create the webMethods flow service to login to the ftp
    3. after login, you can ftp to go to the desired location, and you can list all the file, folders and directory.

    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 10.  RE: how to list directories in Flow-Service?

    Posted Tue May 14, 2019 05:55 AM

    You can use pub.utils:executeOSCommand. You have to specify the directory and command in fileAccessControl.cnf file. In outputMessage, you will get list of all folders and files. Then you can use tokenize to segregate each item.
    Or you can write java service for this.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 11.  RE: how to list directories in Flow-Service?

    Posted Tue May 14, 2019 10:34 AM

    Hi,

    dierctory to be listed should be in fileAccessControl.cnf, but the command being executed needs to be mentioned in OSCommands.cnf.

    Remember to reload WmPublic package or restart IS to activate the changes in these files.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods