Batch File Toolbox
This repository contains a curated toolbox of useful batch files I’ve created over the years.
Batch files are plain text scripts that execute a series of commands through the Windows command interpreter.
Current Total Number of Batch Programs: 12
I plan to continue adding more useful batch files to this repository in the future as I create them to solve various tasks and challenges.
Table of Contents
Getting Started
Each Batch File (located in the source folder of this repository) contains a description of what it does and how to use it.
Additionally, some of the Batch File contain a :HELP section that will display the description and usage when the Batch File is executed with the /? parameter.
To run a Batch File, simply double-click on it using Windows Explorer or run it from the command line.
Use the following Batch Files with Windows Task Scheduler to create an automated process.
Backup Folder
Backup a selected folder and create an archive folder with today’s date appended to it.
Backup_Folder.bat
Check Website
Check if an endpoint is reachable.
Check_Website.bat
Create Event Log
Create an Error Event Code in Windows Event Viewer.
Create_Event_Log.bat
Enable or Disable Scheduled Tasks
Pass in a parameter (ENABLE or DISABLE) to Enable or Disable a Windows Scheduled Task.
Enable_or_Disable_Scheduled_Tasks.bat
FTP Transfer
Transfer files from a FTP Server to a Local file location.
FTP_Transfer.bat
Kill Running Program
Kill a running task.
Kill_Running_Program.bat
Move Files (Inbound)
Move files from a Outbound Location/System to a Inbound Location/System using SMB protocol.
Move_Files_Inbound.bat
Move Files (Outbound)
Move files from an Inbound Location/System to an Outbound Location/System using SMB protocol.
Additionally, this script will create an archive folder to archive the outbound files on a daily basis.
Move_Files_Outbound.bat
Network Status
Endlessly ping an endpoint (Network IP Address) and record the network drops in a log file.
Network_Status.bat
Search and Replace Text
Search a file for a specific string and replace it with another string.
Search_and_Replace_Text.bat
Send Email
Send an email from a batch file via PowerShell.
Send_Email.bat
Folder Watcher
Watch a folder for CRUD changes and log them.
Folder_Watcher.bat
Resources
License
This project is released under the terms of the MIT License, which permits use, modification, and distribution of the code, subject to the conditions outlined in the license.
- The MIT License provides certain freedoms while preserving rights of attribution to the original creators.
- For more details, see the LICENSE file in this repository. in this repository.
Credits
Author: Scott Grivner
Email: [email protected]
Website: linktr.ee/scottgriv
Reference: Main Branch
评论