Aaargh, BATCH. :P Was hoping for a slightly more "common" way to do it, that would work for all OS's, but (*sigh*, Microsoft) Windows is being an ass as usual.
True, but it's just that Batch's syntax sucks. AND Microsoft has exceptional things for practically anything. Hence, law 6: "Microsoft is always to blame."
Or, in modern versions of windows, just use a vbscript or javascript script file. If you want, you can even hook your own scripting language into the explorer shell.
I can think of atleast one interesting concept to apply:
- Just too-late compilation
Program is compiled and run upon execution, the actual executable is only temporary.
Nice, although I feel the name doesn't quite match the concept. How about this? Each function is included twice in a compiled module; once as bytecode of the last version of the function, and again as source code of the current version. The outdated version in run, and once it returns, the newer one is compiled and stored. The old version is kept until the function is updated again.
The name was more to parody the "just in-time compilation", used by some languages. That seems nice (though, I don't think it's going to be implemented on anything anytime soon :P).
Since "everything is a string" in Tcl, including the program itself, which can be modified along with any other data, the bytecode compiler will update "just-in-time" if you change a function/object/whatever.