Return to site

How to turn a folder into a file

broken image

I open output-base-name.cpp and output-base-name.h for writing (will overwrite if they exist).įor each input file, the generator utility does this:ġ: generates a variable-name-friendly identifier based on the filename (' generated_name')ģ: dumps the following into output-base-name.

broken image

Full code is a bit much to post as an SO answer (but see my follow-on comment), although you can probably cook up a quick version of your own in no time.īasically, I wrote a utility that just takes a basename for the output files as argv (' output-base-name'), and argv are input files. It turns out that in the future the Find/Load resource approach I suggested won't be an option for us either (the code that I used it in before is going cross-platform), so I came up with a solution that may also work for you. zip or another Add option that suits you better from the WinZip submenu. The timing of the original question may be fortuitous. Open a folder window and locate the folder you want to zip.