You can apply this method with any file, not just a text file. But you would probably need to complete the steps using the API instead of the command line, because you'll hit various limits for command line lengths. Nonetheless the principles are the same.
You can also do this using MultiChain for Windows, using the API in the same way.