Skip to content

Commit cf77b97

Browse files
authored
Merge pull request #240 from pythonboi/sandbox
remove the variable name that's not needed
2 parents 400a988 + 99ff515 commit cf77b97

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

file_placer.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
getfileList = ' '
1313
newfileExt = []
1414
newSet = set()
15-
fullPath = os.path.join(chgeDirectory, getfileList)
16-
getFilename = []
17-
myAppend = []
18-
15+
fullPath = ''
1916

2017
if currentDirectory != chgeDirectory:
2118
os.chdir(chgeDirectory)
@@ -41,16 +38,14 @@
4138
else:
4239
fileSide.append(check)
4340

44-
4541
if newFolder not in folderSide:
4642
os.mkdir(newFolder)
4743

4844
print(f"{newFolder} folder created successful")
4945
else:
5046
print(f"{newFolder} folder already exits")
5147

52-
53-
# Differentiate the file from the extension
48+
# Differentiate the file from the extension
5449

5550
for f in fileSide:
5651

@@ -60,23 +55,18 @@
6055
fileName = splitFileExt[0]
6156
fileExt = splitFileExt[1]
6257

63-
# Using regular Expression to separate the file extension from the file name
58+
# Using regular Expression to separate the file extension from the file name
6459

6560
for ext in fileExt:
6661
regExt = re.search(r'\.(\w+)', fileExt)
6762
newfileExt.append(regExt.group(1))
6863

69-
# Making the extension to be unique in the file
64+
# Making the extension to be unique in the file
7065

7166
for uni in newfileExt:
7267
newSet.add(uni.lower())
7368

74-
print(newSet)
75-
76-
print("Here is the second set side")
77-
print(len(newSet))
78-
79-
# Creating the Folder from the file extension
69+
# Creating the Folder from the file extension
8070

8171
for uniqFile in newSet:
8272
try:
@@ -92,7 +82,6 @@
9282
for vryFile in lstDir:
9383

9484
if os.path.isfile(vryFile):
95-
9685
fullPath = os.path.join(chgeDirectory, vryFile)
9786

9887
for chkFolder in folderSide:
@@ -114,4 +103,4 @@
114103

115104
urlLink3 = "https://www.youtube.com/watch?v=isRtFdu8sRs"
116105
#
117-
#
106+
#

0 commit comments

Comments
 (0)