Cmd 显示变量中的所有用户配置文件
我需要的所有用户配置文件的输出只有他们的名字没有第一列“所有用户配置文件” 例如: 我正在使用:Cmd 显示变量中的所有用户配置文件,cmd,Cmd,我需要的所有用户配置文件的输出只有他们的名字没有第一列“所有用户配置文件” 例如: 我正在使用: for /f %%a in ('netsh wlan show profile | find /i "all user profile"') do set "%%~a" echo %a% > C:\test.txt @echo off for/f“tokens=2 skip=1 delims=:”('netsh wlan show profile')中的%%a做echo%%a>.\test.
for /f %%a in ('netsh wlan show profile | find /i "all user profile"') do set "%%~a"
echo %a% > C:\test.txt
@echo off
for/f“tokens=2 skip=1 delims=:”('netsh wlan show profile')中的%%a做echo%%a>.\test.txt
(for/f“tokens=1*delims=:“%%a在…做echo/%b)>C:\test.txt
没有发生不幸的事情。我甚至没有收到错误。(对于/F“tokens=1*delims=:”%%a in(netsh wlan show profile | find/i“All user profile”)do echo/%%b)>C:\test.txt您需要像^ |
中的/F那样逃逸管道;我之前没发现。。。
for /f %%a in ('netsh wlan show profile | find /i "all user profile"') do set "%%~a"
echo %a% > C:\test.txt