Skip to content

kuanding/folder_status

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

folder_status

file_status.py is a Python script that scans all files and subfolders in the current directory, and generates a report that displays the total number of subfolders, and the total number of files per individual file extension.

Requirements

  • Python 3.x
  • PrettyTable library (pip install prettytable)
  • OpenPyXL library (pip install openpyxl)

Usage

To run the script, simply navigate to the directory containing the script and run:

python file_status.py This will generate a report that displays the total number of subfolders, and the total number of files per individual file extension, and print it to the console.

By default, the script will output the report to the console, but you can also export it to a CSV file or an Excel file, or a text file, by using the -csv, -xlsx, or -txt command-line arguments, respectively.

To export the report to a CSV file, run: pyhon file_status.py -csv

To export the report to an Excel file, run: pyhon file_status.py -xlsx

To export the report to a text file, run: pyhon file_status.py -txt

Output

The report generated by the script will display the total number of subfolders in the current directory, and the total number of files per individual file extension, in a tabular format.

The first row of the table will contain the column headings, and the subsequent rows will contain the data.

If you choose to export the report to a CSV file, an Excel file or a text file, the output will be saved to a file with the name {current folder name}-{date}.csv or {current folder name}-{date}.xlsx or {current folder name}-{date}.txt, respectively. The {current folder name} variable will be replaced with the name of the current directory, and the {date} variable will be replaced with the current date in the format YYYY-MM-DD.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages