File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def getDirsList(f):
16
16
17
17
18
18
# 返回传入路径 f 文件夹下的所有文件,未加筛选
19
- def getFilesLists (f ):
19
+ def getFilesList (f ):
20
20
f = str (f )
21
21
if f == "" :
22
22
return []
@@ -28,13 +28,21 @@ def getFilesLists(f):
28
28
29
29
def clean (f ):
30
30
# print(f)
31
- nowfiles = getFilesList (f )
32
- print (nowfiles )
33
- for i in nowfiles :
31
+ nowFiles = getFilesList (f )
32
+ if len (nowFiles ) is not 0 :
33
+ print (nowFiles )
34
+ for i in nowFiles :
35
+ print (i )
34
36
a , b = os .path .splitext (i )
37
+ #print(b)
35
38
if b == '.exe' :
39
+ print ('get a .exe' )
36
40
if not os .path .exists (f + '\\ exe\\ ' ):
37
41
os .mkdir (f + '\\ exe\\ ' )
42
+ print (f + i )
43
+ print (f + 'exe\\ ' )
44
+ if os .path .exists (f + '\\ exe\\ ' + i ):
45
+ os .remove (f + '\\ exe\\ ' + i )
38
46
shutil .move (f + i , f + '\\ exe\\ ' )
39
47
nowdirs = getDirsList (f )
40
48
for i in nowdirs :
You can’t perform that action at this time.
0 commit comments