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,475 of 42,547   
   foxidrive to sean   
   Re: mapping drives over 26   
   10 Oct 16 07:08:44   
   
   From: foxidrive@server.invalid   
      
   On 10/10/2016 06:51, sean wrote:   
      
   > This is what I'm doing now:   
   > FOR /F %%A in ('TYPE "%LIST%"') do (   
   >    NET USE * \\%%A\c$ /user:%USER_NAME% %PASSWORD% > nul   
   >   
   > You're saying the net use command may not be necessary at all? How would   
   > I pass username / password?   
      
   In a situation where username/password is required you can do the following:   
      
   > Any idea how would make a script to mount one drive at a time?   
      
   Exactly as you do above but your script continues and processes that drive.   
     It then removes the drive as the last command and the loop processes your   
   next drive in the list.   
      
   Instead of using * you can define a particular drive letter in the net use   
   command and which makes it straight forward to remove it as the last (net   
   use) command.   
      
   > I THINK I've seen A and B used by net use, but I may be mis-remembering.   
      
   I reckon they can be used but just not in all situations.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

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


(c) 1994,  bbs@darkrealms.ca