Batch Output Redirection

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Posts: 1
Joined: 03 Feb 2020 07:48

Batch Output Redirection

#1 Post by pal9898 » 03 Feb 2020 07:56

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

Posts: 1859
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Batch Output Redirection

#2 Post by penpen » 03 Feb 2020 11:35

Typically access to files in the root directory of your system drive (typically "C:") is restricted, so use files in a subfolder.


Post Reply