I currently have a Powershell script that is iterating through bundled MT103 files. Currently, it checks for a flag and decided to forward the file or not. The problem is that sometimes, MT177 (undesired) information comes bundled with the desired file and the file gets forwarded to the drop point.
How can I modify my Powershell script to detect and split this file based on the delimiter which is '{-'.
An example of this is: Multiple payments are separated by a line break. For example:
{-
MT103 payment 1
-}
{-
MT103 payment 2
-}
The desire is to split this file into multiple files and then process them individually.
The resulting files should contain
{-
MT103 payment 1
-}
{-
MT103 payment 2
-}