home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 41,508 of 42,547   
   David Jenkins to All   
   Question about batch labels   
   28 Oct 16 05:31:52   
   
   From: davidjenkins22681@gmail.com   
      
   I am developing a script with a Windows batch file.  The portion I'm working   
   on right now is to take the hostname of the workstation and set it to a   
   variable named current.  We are only running this script on a certain group of   
   machines with known names,    
   so that another batch file can be called to perform the task on the devices   
   associated with that.  My problem is that I am continuing to get the "The   
   system cannot find the batch label specified."  I have seen a few potential   
   solutions for specific    
   scenarios elsewhere, but I was wondering if I could get a brief assist on this   
   since the labels are somewhat random.   
      
   Here is a portion of my code.  I've left my latest attempt at "if   
   errorlevel..." since none of them have seemed to work.   
      
      
   ================================================   
   echo off   
   cls   
   hostname>D:\Install\Script\Carts\name.dat   
   set /p current=

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca