You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
814 B

def foldername(extension):
if(extension == ""):
return None
else:
switcher = {
"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",
"xlsx" : "Excel files",
"ppt" : "Ppt files",
"doc" : "Documents"
}
4 years ago
return switcher.get(extension, "Extras") #returns "Extras" if not in dictionary