Page 1 of 1

Batch Output Redirection

Posted: 03 Feb 2020 07:56
by pal9898
Hi All,

Just need some help with getting output redirected to a file,
When i remove the >> c:\WifiHosts.txt everything works good it displays the results on the console screen
but when i try to redirect output There is nothing in the output file. how can this be resolved.

-----------------------------------------------------------------------------------
@echo off

for /F "tokens=*" %%A in ( c:\PCS.txt) do (
getmac /fo csv /s %%A | Find "Wi-Fi">> c:\WifiHosts.txt

)
@echo on
---------------------------------------------------------------------------------------------

Re: Batch Output Redirection

Posted: 03 Feb 2020 11:35
by penpen
Typically access to files in the root directory of your system drive (typically "C:") is restricted, so use files in a subfolder.

penpen