Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
For WinNT I’ve done a batch file that will:
1] ping the PCs [by NetBios name] in our offices and the default gateways
2] open explorer to show the contents of a specific file that we need for our workOf course the explorer window is a GRAPHICAL representation of this data.
Now what I need to do is modify the batch so that:
3] it shows a non-graphic TEXTUAL representationI’ve got most of it by doing a DIR cmd to send the output to a text file. That’s ok but I need to do a few other things and I’m stuck.
The output of the DIR to the text file contains additional info that I don’t want. The info that I do want is an Axxxxxx and an Sxxxxxxx that will be different for each file output. By the way these Axxxxxx and an Sxxxxxxx that I’m searching for are DIRECTORY NAMES not file names.
The xxxxxx’s after the “A” will be 6 numerical digits that as I say vary.
The xxxxxxx’s after the “S” will be a combination of letters and also numerical digits.
I’ve tried the FINDSTR command to pull these out and send to yet another text file and that ONLY works if I put in the exact Axxxxxx or the Sxxxxxxx I’m looking for.
In other words it appears that the FINDSTR won’t work with any wildcards because if I put in FINDSTR A?????? or S??????? it won’t find them.
If anyone can help me, I thank you in advance. If you want the batch file I have so far, I’ll gladly send it to you.
DaveyBoy
David Bohm
dbohm@allstate.com [work]
Bohm320@aol.com [home]
[330-606-9755 cell}

Maybe this helps.
I use it to filter pc names of netview in a txt fileFOR /f "skip=2 delims=\ " %%a in ('find "HA3" netview.txt') do echo %%a
This is seeking all words beginning with HA3.
skip=2 means not to seek in the first two lines (not necessary)
delims=\ " means just to give out what is between \(at the beginning and empty at the end of the word your seeking for).
Instead of echo you can use whatever you want.I need it cause \\ha3xx username is in the list to filter out ha3xx in a loop.
It would be great to get your batch file
greetings
uliulrich.glueck@t-online.de

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |