File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 13
13
# check is file or dir
14
14
if os .path .isfile (i ):
15
15
# if equal to script name skip
16
- if i == 'temp .py' :
16
+ if i == 'Main .py' or i == "File Magager.exe" :
17
17
continue
18
18
# # split file name to catch extension name
19
19
false_temp , temp = i .split ('.' )
20
20
# append extension of file to ext_file list
21
21
ext_file .append (temp )
22
22
# set folder status to 0
23
23
created_folder [temp ] = 0
24
+ else :
25
+ list_dir .remove (i )
24
26
25
27
# create folder for each type
26
28
for i in ext_file :
37
39
# move files to each folder
38
40
for each in list_dir :
39
41
temp = each .split ("." )
42
+ print (temp )
40
43
# if file is create while program run or
41
44
# create not folder to file name skip it
42
45
if temp [1 ] not in ext_file :
43
46
continue
44
- os .rename (each ,f"./{ temp [1 ]} _files/{ each } " )
47
+ os .rename (each ,f"./{ temp [1 ]} _files/{ each } " )
You can’t perform that action at this time.
0 commit comments