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.
This repository contains several command-line scripts designed to perform the following tasks:
- Folder Creation Script (C++): Automatically creates a specified number of folders in the current directory.
- 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).
- Decibel Calculation Script (C++): Calculates decibel (dB) values for a set of voltage readings based on a reference voltage.
- 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.
- Allows users to specify the number of folders to create (
Folder_1
,Folder_2
, ...,Folder_n
). - Prints success messages in green and error messages in red.
- Menu-driven interface providing these options:
- Clean Temporary Files – runs the system disk cleanup utility.
- Network Interface Information – displays detailed network adapter parameters.
- Ping Command – allows the user to specify the number of ping attempts to a domain.
- Active Connections – shows current active network connections with statistics.
- System Info – outputs detailed system information.
- Open Microsoft Support Page – launches the Microsoft support webpage in the default browser.
- Speed Test – runs a speed test using the Ookla Speedtest CLI tool.
- DNS Cache Cleaning – flushes the DNS resolver cache.
- System Integrity Check – runs the System File Checker tool (
sfc /scannow
). - Disk Health Check – runs the disk checking utility (
chkdsk
). - winget upgrade uses Winget tool to upgrade all software packages installed on PC
- Exit – closes the script.
- 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.
- 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} )
- Visual Studio Community Edition 2022:
- Free and supports C++ development with IntelliSense, debugger, and integrated compiler.
- Download: Visual Studio 2022
- During installation, select the "Desktop development with C++" workload.
-
Python 3.x:
- Required only for ASCII art generation using
pyfiglet
. - Download Python: python.org
- After installation, verify with:
python --version
- Required only for ASCII art generation using
-
pyfiglet:
- A library for generating ASCII art text in the terminal.
- Install using:
pip install pyfiglet
- Ookla Speedtest CLI for network speed testing.
- On Windows, you can install it easily using
winget
:winget install Ookla.Speedtest
- These scripts are designed to run on Windows due to the usage of Windows-specific commands like
ipconfig
,netstat
,chkdsk
, and others.
- Open Visual Studio 2022.
- Go to File > New > Project.
- Select “Console App (C++)”.
- Name the project (e.g.,
FolderCreator
) and click Create. - Replace the contents of the
main.cpp
file with the code for the desired script (folder_creation.cpp
, etc.). - 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...
- Install Python: Download from python.org and select the option "Add Python to PATH" during installation.
- Verify Installation:
python --version