bat wmic python 获取进程的所在路径 doc: wmic process where name="process-name" get executablepath wmic process where "name like '%chrome%'" get processid,commandline /format:list python: import subprocess cmd = 'wmic process where "name=\'
python获取当前文件路径 学习了:https://www.cnblogs.com/strongYaYa/p/7200357.html https://blog.csdn.net/heatdeath/article/details/78070832 https://www.cnblogs.com/WonderHow/p/4403727.html import os print(os.getcwd()) # for root, dirs, files in os.walk(os.getcwd()