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,485 of 42,547    |
|    foxidrive to sean    |
|    Re: mapping drives over 26    |
|    12 Oct 16 13:18:34    |
   
   From: foxidrive@server.invalid   
      
   On 12/10/2016 07:55, sean wrote:   
      
   >> Your code is the problem in that case.   
   >>   
   >> This is a situation in programming where something can only be debugged   
   >> effectively when eyeballs can see the code.   
   >>   
   >   
   > Does this help?   
   >   
   > As mentioned earlier, I only changed one line.   
   >   
    >> The alternative just leads to premature baldness. ;)   
    >   
    > yikes! let's keep our hair.   
      
      
      
   Unfortunately this is still going to be a follicle-removal based task.   
      
      
   1) your variable for %LSIT% isn't defined and is a primary indicator that   
   the code supplied is an untested alpha version. ;)   
      
   2) You have two "net use" commands for the same purpose that use different   
   syntax.   
      
   3) It looks as though your code has un-balanced parentheses, and that   
   breaks code quite badly.   
      
      
      
   >   
   > @echo off   
   >   
   > SET LIST=list.txt   
   > SETLOCAL EnableDelayedExpansion EnableExtensions   
   > SET _DATE=%date:~10,4%%date:~4,2%%date:~7,2%   
   > set _time=%TIME:~0,2%:%TIME:~3,2%:%TIME:~6,2%   
   > set _minute=%TIME:~3,2%   
   >   
   > net use * /del /yes > nul   
   >   
   > FOR /F %%A in ('TYPE "%LSIT%"') do (   
   > NET USE * \\%%A\c$ /user:%USER_NAME% %PASSWORD% > nul   
   > SET file=\\%%A\c$\directory here\foo.bar.xml   
   >   
   > SET ACCT_NUM=   
   > FOR /F %%T IN ('bin\xml sel -t -v   
   > "//Editable[@name='baz.bar']/@default" "!FILE!"') DO (SET D_NUM=%%T)   
   >   
   >   
   > IF "!ACCT_NUM!" == "" (   
   > ECHO %%A is dead, Jim.   
   > GOTO END   
   > ) ELSE (   
   > ECHO.   
   > )   
   >   
   >   
   > bin\sqlite3.exe bin\data.db "INSERT INTO file(date, time, ip_address,   
   > d_num) VALUES (%_DATE%, '%_TIME%', '%%A', '!D_NUM!');"   
   >   
   > ) >> %_date%-%_minute%-results.txt   
   > )   
   >   
   > net use /del * /yes > nul   
   >   
   > ----   
   >   
   > Thanks for any input!   
      
   I hope my input was valuable...   
      
   --- 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