|can this be done for a command output as well .. |
I tried the following code :-
for /f "delims=" %%a IN ('net use \\%computername%\C$ /delete /y') do (
set "line=!line1! and %%a"
echo error = !line!
But it didn't worked .. When I executed this batch file output was :-
The network connection could not be found.
More help is available by typing NET HELPMSG 2250.
last line was error = thats it!!.. I exepected it to be the above error message..
Could you help me here .. Thanks !