All these good ideas... thanks, I'm making notes.
Devon, I do modify USERFOLDER_j_ at startup, and that is good enough for
me as a kludge. The problem was that Edit|Configure reverts to the
original version.
Now that I think about it, I guess I could save the config after I
change it.
Henry
Devon McCormick wrote:
> Henry -
>
> This sounds like a different but similar problem I have when I run my
> backups: I want to name my backup directory differently according to the
> machine on which I'm running.
>
> I use my own "whoami", which simply invokes the OS version of this command
> and parses the result like this:
>
> whoami=: 3 : 0
> sess=. spawn 'net config workstation'
> sess=. dsp&.><;._1 LF,sess-.CR NB. Vec of lines
> sess=. ><;._1&.> ' ',&.>,sess NB. Mat of words
> strs=. 'COMPUTER';<'USER' NB. Strings to key on
> wh=. (<toupper&.>0{"1 sess)e.&.> <&.>strs NB. Which lines start with
> strings
> wh=. ;b2i&.>(<(toupper&.>1{"1 sess)e. <'NAME')*.&.>wh
> wh{2{"1 sess
> NB.EG 'machine userid'=. whoami ''
> )
> whoami ''
> +--------------+---------------+
> |\\NY0193FF51XX|devon_mccormick|
> +--------------+---------------+
>
> I can then use the machine name to customize the target name.
>
> Also, along the lines of Dan's suggestion, is there some reason why you
> can't dynamically update the contents of USERFOLDERS_j_ with the altered
> drive letter? This would allow you to use something like "~MyDir" and alter
> its definition per installation.
>
> Regards,
>
> Devon
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm