https://github.com/vetronics/cli_scripts
CLI Automation Tools This repository contains C++ command-line scripts to automate system tasks, including: Folder Creation: Automatically create multiple folders with custom names. Network Configuration: Display network settings (e.g., IP configuration). System Diagnostics: Clean temp files, check active connections, and gather system info
https://github.com/vetronics/cli_scripts
admin computer-science coverter engeering fdt filesystem network python
Last synced: about 1 month ago
JSON representation
CLI Automation Tools This repository contains C++ command-line scripts to automate system tasks, including: Folder Creation: Automatically create multiple folders with custom names. Network Configuration: Display network settings (e.g., IP configuration). System Diagnostics: Clean temp files, check active connections, and gather system info
- Host: GitHub
- URL: https://github.com/vetronics/cli_scripts
- Owner: vetronics
- License: gpl-3.0
- Created: 2025-04-22T15:05:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-08T07:32:05.000Z (about 1 year ago)
- Last Synced: 2025-05-08T08:30:00.306Z (about 1 year ago)
- Topics: admin, computer-science, coverter, engeering, fdt, filesystem, network, python
- Language: C++
- Homepage:
- Size: 982 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CLI Scripts
A collection of C++ and Python command-line tools for automating common system tasks and calculations. These scripts enable users to manage directories, perform system diagnostics, and calculate decibel values from input voltages.
## Table of Contents
- [Project Overview](#project-overview)
- [Features](#features)
- [Requirements](#requirements)
- [Usage Instructions](#usage-instructions)
- [Compilation with Visual Studio](#compilation-with-visual-studio)
- [Python Setup](#python-setup)
- [License](#license)
- [Troubleshooting](#troubleshooting)
---
## Project Overview
This repository contains several command-line scripts designed to perform the following tasks:
1. **CMD Automation Script** (C++): Provides a set of network-related and system diagnostics commands (e.g., cleaning temp files, displaying network parameters, pinging websites, viewing active connections, and displaying system info).
2. **Decibel Calculation Script** (C++): Calculates decibel (dB) values for a set of voltage readings based on a reference voltage.
3. **Unit Conversion Script** (C++): Calculates multiples and submultiples for various physical units (e.g., meter, kilogram, second, volt, etc.), given an input value.
These scripts integrate with Python for ASCII art in the terminal, providing a visually appealing interface.
---
## Features
### 1. CMD Automation Script (C++)
- Menu-driven interface providing these options:
1. **Clean Temporary Files** – runs the system disk cleanup utility.
2. **Network Interface Information** – displays detailed network adapter parameters.
3. **Ping Command** – allows the user to specify the number of ping attempts to a domain.
4. **Active Connections** – shows current active network connections with statistics.
5. **System Info** – outputs detailed system information.
6. **Open Microsoft Support Page** – launches the Microsoft support webpage in the default browser.
7. **Speed Test** – runs a speed test using the Ookla Speedtest CLI tool.
8. **DNS Cache Cleaning** – flushes the DNS resolver cache.
9. **System Integrity Check** – runs the System File Checker tool (`sfc /scannow`).
10. **Disk Health Check** – runs the disk checking utility (`chkdsk`).
11. **winget upgrade** uses Winget tool to upgrade all software packages installed on PC
12. **Exit** – closes the script.
### 2. Decibel Calculation Script (C++)
- **C++ Version**: Computes the decibel (dB) values for a set of voltages using the formula:
\[
\text{dB} = 20 \times \log_{10} \left(\frac{V_{\text{max}}}{V_{\text{input}}}\right)
\]
Prompts the user for a reference voltage, then processes 21 voltage values to calculate and display corresponding dB values.
### 3. Unit Conversion Script (C++)
- **Functionality**: This script helps in converting units and calculating multiples and submultiples for a given unit.
- The user is prompted to choose a physical unit from a list (e.g., meter, kilogram, second, volt, etc.).
- After choosing the unit, the user is asked to input a reference value for the unit.
- The script calculates the multiples and submultiples of the input value using powers of 10.
- For example, it computes the following for the selected unit:
- Multiples: \( \text{unit} \times 10^i \)
- Submultiples: \( \text{unit} \times 10^{-j} \)
---
## Requirements
### Software
#### C++:
- **Visual Studio Community Edition 2022**:
- Free and supports C++ development with IntelliSense, debugger, and integrated compiler.
- **Download**: [Visual Studio 2022](https://visualstudio.microsoft.com/vs/community/)
- During installation, select the **"Desktop development with C++"** workload.
#### Python:
- **Python 3.x**:
- Required only for ASCII art generation using `pyfiglet`.
- **Download Python**: [python.org](https://www.python.org/downloads/)
- After installation, verify with:
```bash
python --version
```
- **pyfiglet**:
- A library for generating ASCII art text in the terminal.
- Install using:
```bash
pip install pyfiglet
```
#### Speedtest CLI:
- **Ookla Speedtest CLI** for network speed testing.
- On Windows, you can install it easily using `winget`:
```powershell
winget install Ookla.Speedtest
### Operating System
- These scripts are designed to run on **Windows** due to the usage of Windows-specific commands like `ipconfig`, `netstat`, `chkdsk`, and others.
---
## Usage Instructions
### Compilation with Visual Studio
1. **Open Visual Studio 2022**.
2. Go to **File > New > Project**.
3. Select **“Console App (C++)”**.
4. Name the project (e.g., `FolderCreator`) and click **Create**.
5. Replace the contents of the `main.cpp` file with the code for the desired script (`folder_creation.cpp`, etc.).
6. Press **Ctrl + F5** or click **Debug > Start Without Debugging** to compile and run the script.
> 🔧 You can also add additional `.cpp` files to the project: right-click on the project > **Add > Existing Item...**
---
### Python Setup
1. **Install Python**: Download from [python.org](https://www.python.org) and select the option *"Add Python to PATH"* during installation.
2. **Verify Installation**:
```bash
python --version