Board logo

标题: [其他] [已解决]批处理能不能获取窗口标题(并且保存为文本)?谢谢 [打印本页]

作者: yyz219    时间: 2022-9-19 18:22     标题: [已解决]批处理能不能获取窗口标题(并且保存为文本)?谢谢

问题解决:

PowerShell "Get-Process | ?{ ![string]::IsNullOrEmpty($_.MainWindowTItle)} | forEach{ $_.Mainwindowtitle }" > 1.txt
作者: WHY    时间: 2022-9-19 19:16

  1. PowerShell "Get-Process | ?{ ![string]::IsNullOrEmpty($_.MainWindowTItle)} | forEach{ $_.Mainwindowtitle }" > 1.txt
复制代码

作者: yyz219    时间: 2022-9-19 19:38

WHY 发表于 2022-9-19 19:16



    感谢,我试一试先
作者: yyz219    时间: 2022-9-19 19:44

感谢,我试一试先
yyz219 发表于 2022-9-19 19:38



    问题解决,非常感谢
作者: Batcher    时间: 2022-9-19 21:34

回复 1# yyz219
  1. tasklist /v /fo csv >1.csv
复制代码

作者: yyz219    时间: 2022-9-20 08:29

回复  yyz219
Batcher 发表于 2022-9-19 21:34



    很快,但是,没有窗口的进程也来了
作者: Batcher    时间: 2022-9-20 08:50

回复 6# yyz219


    用 findstr 命令筛选一下试试
作者: yyz219    时间: 2022-9-20 08:53

本帖最后由 yyz219 于 2022-9-20 08:54 编辑
回复  yyz219


    用 findstr 命令筛选一下试试
Batcher 发表于 2022-9-20 08:50



    我一窍不通,能不能帮我弄一下
开了新帖子:http://www.bathome.net/thread-63824-1-1.html
作者: Batcher    时间: 2022-9-20 08:56

回复 8# yyz219


[批处理命令一日一教学]字符串查找:findstr
http://bbs.bathome.net/thread-14682-1-1.html

看完教程之后,请先自己尝试一下,如果遇到问题大家再一起研究和讨论。




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2