Skip to content

saghosh8/python-scripting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-scripting

A collection of practical Python scripts for file management, automation, system administration, and other useful tasks.

Overview

This repository contains a wide variety of standalone Python scripts that automate common tasks such as file and directory operations, archiving, logging, disk usage checks, and more. Each script is self-contained with descriptive filenames and in-code documentation.

Sample Scripts

  • File Management:

    • List all files and folders in a directory
    • Move files based on type
    • Sort files into subfolders by extension
    • Count files by extension
    • Backup files by copying
    • Delete files older than a certain age
  • Archiving & Compression:

    • Archive log files older than 30 days
    • Zip and unzip directories
  • System Operations:

    • Check disk usage
    • Get system information
    • Use Python's logging module
  • Basic File I/O:

    • Read a file line by line into a list
    • Write to and reopen files

Usage

Each script is independent. You can run any script using:

python <script-name.py> [arguments]

Refer to the comments at the top of each script for usage instructions and required arguments.

Requirements

  • Python 3.x
  • Some scripts require additional modules (e.g., psutil, shutil). Install dependencies as needed.

Contributing

Feel free to submit issues or pull requests to add new scripts or improve existing ones.

Author


This repository is a growing collection. Contributions and suggestions are welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages