Hi Devon, I copied and tried your whoami verb. I get the following error.
whoami'' |value error: dsp | sess=. dsp&.><;._1 LF,sess-.CR what is dsp? Thanks, Ken -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Devon McCormick Sent: Monday, November 16, 2009 7:36 PM To: [email protected] Subject: Re: [Jbeta] Projects on USB drives WAS: Project Files 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
