我创建了文件夹快捷方式对于我的任务栏,我希望他们停止每次启动新的资源管理器
所以我决定创建一个批处理脚本,但是我无法从explorer.exe获取 child
@echo off
pushd
tasklist /nh /fi "imagename eq explorer.exe C:\Users\danil\Desktop\ISO" | find /i "explorer.exe C:\Users\danil\Desktop\ISO" > nul ||(start explorer.exe C:\Users\danil\Desktop\ISO)
最佳答案
您尝试的问题是任务列表只会列出 explorer.exe
的一个实例,而不列出每个打开的窗口的标题。
对this进行了一些编辑我创建了listWindows.bat - 它将列出所有可见的窗口名称及其相应的可执行文件。所以你可以试试这个:
call listWindows.bat|findstr /i /b /e "explorer::Downloads" >nul 2>nul || (
start "" explorer.exe "C:\Users\%username%\Downloads"
)
要检查您需要启动的窗口,您可以尝试以下操作:
call listWindows.bat|findstr /i /b "explorer::"
关于windows - 批量获取Explorer的 child ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48084216/