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 40,591 of 42,547    |
|    REJEKTO to Guy    |
|    Re: findstr or parsing    |
|    08 Dec 12 07:42:16    |
      From: rejekto69@gmail.com              On Friday, December 7, 2012 5:24:42 PM UTC-6, Guy wrote:       > REJEKTO wrote:       >       >       >       > > I have manage to finally parse a file to the barest. All I have       >       > > now is the following samples:       >       > >       >       > > (W3SVC/34945844)       >       > > (W3SVC/54452847)       >       > > (W3SVC/14932848)       >       > > (W3SVC/34932849)       >       > >       >       > > I would like to go one more step further and parse everything out       >       > > except the (site) numbers.       >       > >       >       > > The result would be directed to a txt file and only shows the site       >       > > #. Line by line with no spaces. Example below.       >       > >       >       > > 34945844       >       > > 54452847       >       > > 14932848       >       > > 34932849       >       > >       >       >       >       >       >       > Try...       >       >       >       > FOR /F "tokens=2 delims=/)" %I IN (file) DO @ECHO %I       >       >       >       > $ TYPE file       >       > (W3SVC/34945844)       >       > (W3SVC/54452847)       >       > (W3SVC/14932848)       >       > (W3SVC/34932849)       >       > $ FOR /F "tokens=2 delims=/)" %I IN (file) DO @ECHO %I       >       > 34945844       >       > 54452847       >       > 14932848       >       > 34932849       >       >       >       > $              Works like a charm! Thank you very much Guy!              Funny I've been using tokens and delim for part of my code on this exercise       but obviously haven't grasp it nearly well enough. This definitely got me on       the right track on using the syntax.              --- 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