added main and few extensions

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

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

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