My understanding on inbound file processing is, B2B uses file name to identify a particular trading partner.No, it is not the case always. Directory name (which is being polled by B2B) can also be used to identify the TP name and other info. In case of EDI/HL7, corresponding document identifiers can be used to identify the TP's, so filename becomes irrelevant in this case.
My understanding on the required info for b2B to identify trading partner is: %TO_PARTY%_%FROM_PARTY%_%DOCTYPE_NAME%_%DOCTYPE_REVISION%.This is for outbound. As I mentioned above, filename may or may not be used to identify all four points in case of inbound.