Python that executes commands as if you hit the command prompt.
# coding:utf-8
import os
cmd = "ipconfig /all > D:\\ipconfig.txt"
os.system(cmd)
cmd = "tree D:\\Doc /f > D:\\tree.txt"
os.system(cmd)
If you make it an executable file, you can distribute it like .bat.
Please let me know if there is a smarter way to write it.
Ijo
Recommended Posts