Forum Stats

  • 3,816,034 Users
  • 2,259,132 Discussions
  • 7,893,366 Comments

Discussions

How to delete multiple files using file adapter

bob
bob Member Posts: 235
edited Aug 14, 2018 9:04PM in SOA Suite Discusssions

Hi All,

We are using SOA11g, and the requirement is to delete all the files inside a directory, which are of a particular format.

For ex. we need to delete all files ending with .pdf.

I have gone through:

Biradar ShriKant Oracle SOA Blog: File / FTP Adapter SOA - COPY / MOVE / DELETE Operation

https://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm#TKADP2109

but these documents talks about deleting single file,

I tried below pattern but no luck

<property name="TargetFileName" value="*.pdf"/>

<property name="TargetFileName" value="*\.pdf"/>

<property name="TargetFileName" value=".*\.pdf"/>

<property name="TargetFileName" value="*"/>

How can I achieve this requirement?, is there any other property available which will look for pattern for target file, like TargetFileNamingConvention or TargetIncludeFiles?

Regards,

Bob

Tagged:

Answers

  • vladodias
    vladodias Member Posts: 2,283 Gold Trophy
    edited Aug 14, 2018 9:04PM

    Hi mate,

    I'm not aware of any property that will look for wildcard patterns... A possible solution to achieve your requirement is to use a "list" operation and then iterate to delete the files one by one...

    Cheers,

    Vlad

This discussion has been closed.