Created
          December 11, 2021 08:04 
        
      - 
      
- 
        Save 1ycx/e28651223ae099cf2bfd779d65019d60 to your computer and use it in GitHub Desktop. 
    Download folder cleaner script
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import getpass as gt | |
| import os | |
| from collections import Counter | |
| WIN_BASE = "C:\\Users\\kogam\\Downloads" | |
| EXCEL_XTS = ["xls", "xlsx", "xlsb", "xlsm", "xlam"] | |
| SETUP_XTS = ["dmg", "deb", "dnf", "exe", "msix", "msixbundle", "cab", "cub", "ex_", "idt", "msi", "msp", "mst", "pcp", "rbf", "rra", "stf"] | |
| ARCHIVE_XTS = ["zip", "tar", "xz", "7z", "bz2", "pkg", "lz", "lzh", "rar", "gz", "tgz", "war"] | |
| files = os.listdir(WIN_BASE) | |
| files_ext = [x.split(".")[-1] for x in files] | |
| c = Counter(files_ext) | |
| # todo | |
| # os.walk | |
| # https://stackoverflow.com/a/2759553/8690463 | |
| print(c) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment