These files require transformation. They are HL7 messages and need segment changes according to the directories.
I don’t see any property that will also give a directory name: Attributes ("filename") is not the solution, unfortunately

>>> They should be deleted from the sftp server once transferred?
It’s already been done.

Any COS example will be very helpful.