How do you guys handle your libraries of functions/macros/utilities? A couple of the types of things I'm looking for are:
1. How do you deal with updating shared macros/functions, etc. when your existing scripts (which rely on these) are working perfectly fine - when updating the shared code can risk breaking an existing dependency.
- I've thought about keeping different versions of shared code but that seems like overkill for what I do.
2. How do you deal with running your scripts on machines that are not your "main" machine - which don't have all of your utilities in your path?
Often, I like to test things out within a VM which doesn't have all of the code needed. For this issue I've experimented with encoding some utilities within my script and extracting them if needed but I can see how this could become a maintenence nightmare.
Anyway, I'm just looking for ideas on how others deal with things like this...
batch library usage / methodology question.
Moderator: DosItHelp
Re: batch library usage / methodology question.
Ad 1) http://www.dostips.com/forum/viewtopic.php?p=46726#p46726
Ad 2) I only place my batches on "my main machine" (aka "the server").
I access the files from a virtual virtual drive (subst.exe X: "\\server\foo\X"),
so the directory structure is always the same, and my "collection" is always complete.
penpen
Ad 2) I only place my batches on "my main machine" (aka "the server").
I access the files from a virtual virtual drive (subst.exe X: "\\server\foo\X"),
so the directory structure is always the same, and my "collection" is always complete.
penpen
Re: batch library usage / methodology question.
In the long term I've come avoid sharing macros/functions and your comment is the reason - because code breaks and I can't test every script again.
Every script I have is self-contained and reliable, and the only shared script is one that returns the date-time in a format that I use everywhere.
One way to handle that is to put them all on a usb stick and then have your scripts call a shared script.
That script searches for a known file on all drive letters and adds that drive to the PATH.
You may be referring to applications rather than what I term as utilities, but USB sticks are massive and fairly quick these days and in a pinch even big apps can work ok.
Every script I have is self-contained and reliable, and the only shared script is one that returns the date-time in a format that I use everywhere.
mirrormirror wrote:2. How do you deal with running your scripts on machines which don't have all of your utilities in your path?
One way to handle that is to put them all on a usb stick and then have your scripts call a shared script.
That script searches for a known file on all drive letters and adds that drive to the PATH.
You may be referring to applications rather than what I term as utilities, but USB sticks are massive and fairly quick these days and in a pinch even big apps can work ok.