
RUN BAT RECURSIVELY IN PYTHON
Publicado por [email protected] (2 intervenciones) el 21/01/2015 18:07:00
Hello,
I want to run x.bat automatically and recursively in Python:
To get started I have this:
I want to run x.bat automatically and recursively in Python:
1
2
3
4
5
6
7
8
9
10
11
C:\test
|
+---folder1
| x.bat
|
+---folder2
| x.bat
|
.
.----folder..n
x.bat
To get started I have this:
1
2
3
4
5
6
from __future__ import print_function
import os
for root, dirs, files in os.walk("C:\test"):
for file in files:
if file.endswith(".bat"):
print(os.path.join(root, file))
Valora esta pregunta


0