Search found 108 matches

by booga73
03 Mar 2018 14:37
Forum: DOS Batch Forum
Topic: Combine Text Searches / Strings to a specified .cvs format
Replies: 6
Views: 6424

Re: Combine Text Searches / Strings to a specified .cvs format

Elzooilogico,

That is very amazing; thank you for your support. Both outputs are good.

very respectfully,
Booga73
by booga73
02 Mar 2018 11:15
Forum: DOS Batch Forum
Topic: Combine Text Searches / Strings to a specified .cvs format
Replies: 6
Views: 6424

Combine Text Searches / Strings to a specified .cvs format

for /f "tokens=7*" %a in ('findstr /c:"NIST SP 800-53 Revision 4 ::" test1.txt') do @echo %a %b for /f "tokens=9*" %a in ('findstr /c:"Vuln ID:" test1.txt') do @echo %a Hello DosTips, I have a text file which I need 2 items pulled from. The 2 items I'm requesting to retrieve: Item1 = Vuln ID: refer...
by booga73
09 Jul 2014 11:24
Forum: DOS Batch Forum
Topic: using usebackq
Replies: 3
Views: 4191

using usebackq

in using usebackq, my attempt was to read the last token of each line, but tokens vary per line, so that's why I need to read the last token. I interpreted that the command, usebackq, that it would reverse how the token will be processed / read, ie- as it will permit reading the last token. usebackq...
by booga73
07 Jul 2014 13:09
Forum: DOS Batch Forum
Topic: Broken String Help
Replies: 4
Views: 3770

Re: Broken String Help

okay, I figured out a way to just get the string and remove the last 2 tokens. But, is there a way to not use: !rgval1:~0,-20! ? my script which showed that it worked: Setlocal EnableDelayedExpansion for /f "usebackq tokens=*" %%a in ("c:\irtools\SharedDll1.txt") do ( Call :ChkEx...
by booga73
07 Jul 2014 12:40
Forum: DOS Batch Forum
Topic: Broken String Help
Replies: 4
Views: 3770

Broken String Help

Problem, my script reads the string value, but outputs broken strings. As long as my string doesn't have space in the string, the value output is good. But when I get a string with space, my output string is broken. I've had some diffculty in the pass regarding reading string values, but need suppor...
by booga73
19 Jun 2014 14:37
Forum: DOS Batch Forum
Topic: dos window display characters
Replies: 2
Views: 2914

Re: dos window display characters

thank you! thus another quest for a batch script! v/r Booga :lol:
by booga73
19 Jun 2014 08:35
Forum: DOS Batch Forum
Topic: dos window display characters
Replies: 2
Views: 2914

dos window display characters

Is there any way to display in the command window in different coordinate locations, X,Y, a character? Simply, the script to read in a character from a string (string being a variable) and randomly position that character to different positions in the console window? I tried looking up snippet optio...
by booga73
02 Jun 2014 12:00
Forum: DOS Batch Forum
Topic: Function - read text file and preserve line read
Replies: 9
Views: 7411

Re: Function - read text file and preserve line read

need help again . .. . please I've tried the options below as illustrated, but problem parsing out the strings that contain: C:\Windows\winsxs\ is not working. All the lines whether consisting C:\Windows\winsxs\ are being included, echo'ed, into my final text file I tested on a Windows 7 x32 bit O/S...
by booga73
02 Jun 2014 08:32
Forum: DOS Batch Forum
Topic: Function - read text file and preserve line read
Replies: 9
Views: 7411

Re: Function - read text file and preserve line read

thank you! I appreciate the input and time put into the help provided. I do like Yury's option for delayed expansion; that options allows me to maintain my code I wrote. The other script options show a very small modification too. Dave also simplifies to 1 line code! Awesome! In summary, in using de...
by booga73
01 Jun 2014 22:09
Forum: DOS Batch Forum
Topic: Function - read text file and preserve line read
Replies: 9
Views: 7411

Function - read text file and preserve line read

@ECHO OFF for /f "tokens=*" %%a in (%tmp%\ExePath1.txt) do ( Call :MySplitPath %%a ) echo. echo This is the End of code. pause :MySplitPath %1 set val1=%* for /f "tokens=2,3 delims=\" %%a in ("%val1%") do ( if NOT "%%b"=="WinSxS" echo %val1% >> %tmp...
by booga73
18 Apr 2014 13:18
Forum: DOS Batch Forum
Topic: FindStr & Placing output into single value
Replies: 2
Views: 3299

Re: FindStr & Placing output into single value

I am humbly thankful. :)

for /f "skip=1 tokens=2 delims=:" %a in ('findstr /c:"Chip type:" dxddiag.txt ') do set val=%a

C:\temp1a>@echo %val%
Intel(R) HD Graphics Family

so simple, thank you!

v/r Booga
by booga73
18 Apr 2014 13:10
Forum: DOS Batch Forum
Topic: FindStr & Placing output into single value
Replies: 2
Views: 3299

FindStr & Placing output into single value

I'm using dxddiag.txt and storing that information to a text to examine information regarding my video, but I don't want to keep using temporary files to hold information. I'm not sure how many tokens to account for my script command. How would you write your line of batch code to store the informat...
by booga73
21 Feb 2014 06:31
Forum: DOS Batch Forum
Topic: query Active directory display name
Replies: 15
Views: 11633

Re: query Active directory display name

agh, yes, that's correct, ty; Great job on the scripting.

v/r Booga73
by booga73
20 Feb 2014 10:08
Forum: DOS Batch Forum
Topic: query Active directory display name
Replies: 15
Views: 11633

Re: query Active directory display name

here's another option to identify who's logged in:

Code: Select all

for /f "tokens=1-2 delims=\" %g in ('whoami') do @echo %h


I've tried that here on my end at the command prompt, and returned the user name.

v/r Booga73
by booga73
17 Feb 2014 22:12
Forum: DOS Batch Forum
Topic: Proper Logic
Replies: 3
Views: 4062

Re: Proper Logic

Thank you Cat; :) i'm smacking myself in the face now .. . . .v/r Booga73