Question

I have a file that contains multiple lines of data, e.g:

dfscmd /map "\SERVER\PATH\AREA\testuser" "\NEW_SERVER\PATH\testuser" "DFSLink Home Drive: Test, User"

dfscmd /map "\SERVER\PATH\AREA\testuser1" "\NEW_SERVER\PATH\testuser1" ""

I am using FINDSTR to find the username (e.g testuser) and the entire line of the query - so, if FINDSTR fins the line entitled testuser then it should display the entire line of that user:

Finds: testuser Should display: \NEW_SERVER\PATH\testuser1

any idea how I can do this? I can get just to find the user name but no idea how to output the entire line?

Thanks,

Was it helpful?

Solution

Try findstr /C:searchstring fileyouaresearching.txt

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top