Skip to content

Commit

Permalink
use os.path.join to create folder paths
Browse files Browse the repository at this point in the history
  • Loading branch information
rjwignar committed May 16, 2024
1 parent 2f4d14b commit 905745d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions folderizer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
if os.path.splitext(entry.name)[1] in images:
imageCount+=1
print("image detected")
imagePath = target_path + '\images'
imagePath = os.path.join(target_path, "images")
print(imagePath)
if not (os.access(imagePath, os.F_OK)):
print('creating images folder')
Expand All @@ -56,7 +56,7 @@
elif os.path.splitext(entry.name)[1] in videos:
videoCount+=1
print("video detected")
videoPath = target_path + r'\videos'
videoPath = os.path.join(target_path, "videos")
print(videoPath)
if not (os.access(videoPath, os.F_OK)):
print('creating videos folder!')
Expand All @@ -76,7 +76,7 @@
elif os.path.splitext(entry.name)[1] in text:
textCount+=1
print("text file detected")
textPath = target_path + r'\textFiles'
textPath = os.path.join(target_path, "textFiles")
print(textPath)
if not (os.access(textPath, os.F_OK)):
print('creating textFiles folder!')
Expand Down

0 comments on commit 905745d

Please sign in to comment.