The book Microsoft SQL Server 2008 Integration Services: Problem, Design, Solution describes such a scenario.
Basically you do everything in a .NET script task.
You check the file type, choose the corresponding OLE DB adaptor, read the data into a file table and use the SQLBulkCopy class to bulk load it into the SQL database (which is feasible since you already have the mapping).
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP