In the beginning of the article, it is explained how you can add a variable to the variable mappings of the for each loop container. This variable will contain the filename. The contents of this variable will change every time the loop picks up a new file.
If you only need a part of the filename, create another variable and use an expression to substract only the part you need from the original variable (with substring). Finally, put the variable value in the rows. You can do this afterwards with a simple UPDATE statement, or you can add an extra OLE DB source with the statement SELECT ? As Filename, where the ? maps to the variable. Merge this input with your flat file input.
Note: the flat file source has an option to include the filename in the rows, but that will give you the full filename. http://sqlblog.com/blogs/jamie_thomson/archive/2010/03/31/filenamecolumnname-property-flat-file-source-adapter-ssis-nugget.aspx
You can use this and then issue an UPDATE statement against your table to replace the full filename with only the part you need.