Part of that is because you are working from a very old demo macro. Things have moved on since then.
If you look at the KM Wiki "Actions" page you'll see a "Prompt for File" action, a "For Each" action, and an "Insert Text by Typing" action.
So you can choose a file then type out its contents one line at a time, remembering to include the other keystrokes etc to move between input boxes. For example:
