added main and few extensions

master
piyx 5 years ago committed by piyx
parent 9a88edfd60
commit 9238a58c45

@ -3,19 +3,20 @@ def foldername(extension):
return None return None
else: else:
switcher = { switcher = {
"exe" : "Software/Applications", "exe" : "Software",
"txt" : "Notes/Text", "txt" : "Notes-Text",
"pdf" : "PDFs", "pdf" : "PDFs",
"c" : "C programs", "c" : "C programs",
"py" : "Python files", "py" : "Python files",
"java": "Java programs", "java" : "Java programs",
"cpp" : "Cpp programs", "class": "Java programs",
"jpg" : "Images", "cpp" : "Cpp programs",
"png" : "Images", "jpg" : "Images",
"jpeg": "Images", "png" : "Images",
"raw" : "Images", "jpeg" : "Images",
"mp3" : "Music", "raw" : "Images",
"mp4" : "Videos", "mp3" : "Music",
"mkv" : "Videos", "mp4" : "Videos",
"mkv" : "Videos",
} }
return switcher.get(extension, "Extras") #returns "New Folder" if not in dictionary return switcher.get(extension, "Extras") #returns "New Folder" if not in dictionary

@ -13,9 +13,6 @@ paths = {
"D Drive" : "D:/" "D Drive" : "D:/"
} }
print("\n\n1:Organize Files\n2:Backup To Drive\n3:Rename Unordered Files")
choice = int(input("\nEnter choice:"))
def organizeFiles(): def organizeFiles():
print("\n\nFolders...\n") print("\n\nFolders...\n")
for key in paths.keys(): for key in paths.keys():
@ -64,14 +61,22 @@ def organizeFiles():
return 0 return 0
if(choice == 1): def main():
organizeFiles() print("\n\n1:Organize Files\n2:Backup To Drive\n3:Rename Unordered Files")
elif(choice == 2): choice = int(input("\nEnter choice:"))
print("Backup feature not available yet")
elif(choice == 3): if(choice == 1):
print("Feature to be added soon") organizeFiles()
else: elif(choice == 2):
print("\nInvalid Choice") print("Backup feature not available yet")
elif(choice == 3):
print("Feature to be added soon")
else:
print("\nInvalid Choice")
if __name__ == "__main__":
main()

Loading…
Cancel
Save