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++ Version: Calculates decibel (dB) values for a set of voltage readings based on a reference voltage.
- Python Version: A Python alternative for calculating decibel values from a set of input voltages, with similar functionality and output format.
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 (named
Folder_1
,Folder_2
, ...,Folder_n
). - Prints success messages in green and error messages in red.
- Provides a menu-driven interface to select from five system management tasks:
- Clean Temporary Files: Wipes out system temp files.
- Network Interface Information: Displays network adapter settings.
- Ping Command: Pings a specified domain multiple times.
- Active Connections: Displays statistics for active network connections.
- System Info: Outputs detailed system information.
-
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.
-
Python Version: The Python script offers the same functionality as the C++ script but can be easily executed on systems with Python installed. The Python version prompts for the reference voltage and calculates the dB values for a set of voltages, outputting the result in a user-friendly format with ASCII art.
- C++ Compiler (for C++ scripts): The scripts are written in C++ and require a C++ compiler to compile and run (e.g., GCC, MinGW, or MSVC).
- Dev C++ 5.11: An Integrated Development Environment (IDE) for C++ development, which includes a built-in GCC compiler. You can use Dev C++ 5.11 to compile and run these scripts.
- Download Dev C++ 5.11: Dev C++ Official Website
- After installing Dev C++ 5.11, you can compile the scripts by opening them within the IDE, then clicking Execute > Compile & Run.
- Python: Required for displaying ASCII art using the
pyfiglet
library and running the Python version of the Decibel Calculation script.-
Python Installation:
- Download and install Python from the official website: Python.org
- After installation, ensure Python is added to your system's
PATH
. You can verify by running:python --version
- This should return the Python version installed on your system.
-
Install
pyfiglet
module:pyfiglet
is used for ASCII art in the terminal.- Install the module using pip:
pip install pyfiglet
-
- These scripts are designed to run on Windows due to the usage of Windows-specific commands like
ipconfig
,netstat
, andDEL
.
If you're using Dev C++ 5.11:
- Install Dev C++ 5.11 from the official website.
- Open the script (
folder_creation.cpp
,cmd_automation.cpp
, ordecibel_calculation.cpp
) in Dev C++. - Compile and Run:
- Click Execute > Compile & Run from the menu or press
F9
to compile and run the script.
- Click Execute > Compile & Run from the menu or press
Alternatively, for command-line compilation:
- Ensure a C++ compiler is installed (e.g., GCC, MinGW, MSVC).
- Save each script as a
.cpp
file (e.g.,folder_creation.cpp
,cmd_automation.cpp
,decibel_calculation.cpp
). - Open a terminal and navigate to the directory where the
.cpp
files are saved. - Compile the scripts using the following commands (for GCC):
g++ -o folder_creation folder_creation.cpp g++ -o cmd_automation cmd_automation.cpp g++ -o decibel_calculation decibel_calculation.cpp