Resource File Generator

Every once in a while, a thread pops up in Newbie Questions or Requests for a way to easily send a fair stack of files to the client without having to type it all out themselves, and the response generally include a solution that recursively loops through all the folders starting at the branch the function is given.

This is bad. Lack of care will send all the models the server has to the client, or some other bulky solution that isn’t very efficient.

Ages ago, I made a generator for myself and have posted it a few times, and just want to make a general thread on this so more people can get it if they want.

Requires .Net 3.5.

Filters out certain things - svn data, hidden folders ( although I suspect it’s broken ), and lua folders along with some others like the toybox folder as well as a few more file types.

April 26, 2011 - Remade again to be simpler.
Supports bz2 compression and supports decent dialogs on modern operating systems with fallbacks for xp. Also ditched the previous split forms in favor of it being easier in general to use.
It’s also a lot faster - I’m able to load my garrysmod folder in a fraction of the time it took the previous version.

May 27, 2010 - Completely remade from scratch.
Includes an easy to use directory browser rather than just a browse folder dialog ( although that option still exists ). Should be somewhat faster as well in regards to generating files. Tested lightly, let me know if something doesn’t work.


File is generated in the same folder as the executable.
Does contain some things that are relatively hard coded, such as the resource file name and ignored folders.

If you don't need this, please don't post saying it's useless
Please don't post telling me to program it in another language. I don't care.

That said, this isn’t licensed code, so do whatever you want with it, even sell it if your heart desires. However, do not claim it is yours because it will be very obvious.

I remember me seeing this in an old thread way back. I’ve had it ever since I saw that thread. I gave it to a lot of my friends and it has helped us a lot. Thanks :3

Oh I wish I knew about that before. Thanks for posting it!

This is epic its going to save a lot of time


Nice. I like.


This is very nice. Thanks a lot.

Aww… I was just about to upload mine :frowning:
Well, heres mine anyway

Link (Executable & Source Included):


  • First time run configuration
  • Generate resource file to specified location.

Why not post your own thread?

I figured it would be obsolete.
My stuff never gets very popular. :frowning:

Something that I didn’t incorporate into mine is the ability to drag and drop files into it, since I intended mine to be pointed at an addons or content folder. If you added that, you’d have something that would be more unique, more for general use rather than the specialization mine has.

Nothing wrong with people having multiple choices.

New version, check first post to get it.

What has changed?

Could always, you know, read the first post.

Whoeps, didn’t see that.

its allredy exists

Except if you consider this was released 5 months before yours.

You really should use resource.AddSingleFile. AddFile will add ones other than the selected ones, and will print errors to the console about them not existing even if you never wanted them added. AddSingleFile avoids that, and thus fits the purpose better.

Then, you should consider reading the registry to find where steam is installed, and using some logic to list the potential garrysmod directories, rather than just forcing the user to browse for it from the start ( although leave the option to browse for it there in the event the user is doing something strange like using it on a dedicated server ).

Personally, I like my interface more than yours ( the dock-styled interfaces don’t look as nice as anchor onces ), but that’s hardly here nor there.

Sorry for being a total noob, but i don’t even know how to use this? I select the addons and materials and crap i want to the TXT file, and then i do what? when i press Generate,nothing happens?