Skip to content

This code is a file organizer that categorizes files in a folder based on their file extension.

Notifications You must be signed in to change notification settings

tolgakurtuluss/file-orderer-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

File Sorting Script

This is a Python script that sorts files in a specified folder into separate categories based on their file extensions. The script creates a new folder for each category, and then moves the files with the corresponding extensions into the appropriate folder.

Classifiable extensions

  • "Images": [".jpg", ".jpeg", ".jpe", ".jif", ".jfif", ".jfi", ".png", ".gif", ".webp", ".tiff", ".tif", ".bmp", ".dib", ".svg", ".svgz", ".ico", ".icns"]
  • "Documents": [".doc", ".docx", ".dot", ".dotx", ".dotm", ".xls", ".xlsx", ".xlsm", ".xlsb", ".xlt", ".xltx", ".xltm", ".ppt", ".pptx", ".pot", ".potx", ".potm", ".pptm", ".pdf", ".txt", ".rtf", ".odt", ".ods", ".odp", ".csv", ".md", ".tex"]
  • "Videos": [".mp4", ".mov", ".m4v", ".mkv", ".avi", ".wmv", ".flv", ".webm", ".mpeg", ".mpg", ".mp2", ".mpe", ".mpv", ".m2v", ".m4v", ".3gp", ".3g2"]
  • "Music": [".mp3", ".aac", ".m4a", ".wav", ".flac", ".alac", ".aiff", ".ogg", ".wma", ".ac3", ".amr", ".ra", ".mid", ".midi", ".opus", ".spx", ".opus"]
  • "Archives": [".zip", ".rar", ".tar", ".tar.gz", ".tgz", ".tar.bz2", ".tbz2", ".tar.xz", ".txz", ".7z", ".sit", ".sitx"]
  • "Programs": [".exe", ".msi", ".dmg", ".app", ".deb", ".rpm"]
  • "Scripts": [".py", ".ipynb", ".sh", ".bash", ".zsh", ".fish", ".bat", ".cmd", ".ps1", ".vbs", ".js", ".rb", ".php", ".pl", ".lua", ".scala", ".go", ".dart", ".cs", ".java", ".m", ".r", ".swift", ".ts", ".coffee", ".html", ".css"]
  • "Spreadsheets": [".xlsx", ".xlsm", ".xlsb", ".xltx", ".xltm", ".ods", ".csv", ".tsv"]
  • "Presentations": [".pptx", ".pptm", ".potx", ".potm", ".ppsx", ".ppsm"]
  • "Web": [".html", ".htm", ".css", ".js", ".php", ".asp", ".aspx", ".jsp", ".xml"]
  • "Other": []

Result

About

This code is a file organizer that categorizes files in a folder based on their file extension.

Topics

Resources

Stars

Watchers

Forks

Languages