Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/scottgriv/batch-useful_bat_files

A collection of useful Windows Batch files.
https://github.com/scottgriv/batch-useful_bat_files

batch-file batch-script utility utility-app utility-application utility-script windows windows-batch windows-batch-script

Last synced: about 1 month ago
JSON representation

A collection of useful Windows Batch files.

Awesome Lists containing this project

README

        









GitHub Badge
Email Badge
BuyMeACoffee Badge


Silver

---------------

Useful Batch Files

This repository contains a collection of useful Batch Files that I have created over the years.

Batch files are text files that contain a series of commands to be executed by the command interpreter.

---------------

## Table of Contents

- [Getting Started](#getting-started)
- [Backup Folder](#backup-folder)
- [Check Website](#check-website)
- [Create Event Log](#create-event-log)
- [Enable or Disable Scheduled Tasks](#enable-or-disable-scheduled-tasks)
- [FTP Transfer](#ftp-transfer)
- [Kill Running Program](#kill-running-program)
- [Move Files (Inbound)](#move-files-inbound)
- [Move Files (Outbound)](#move-files-outbound)
- [Network Status](#network-status)
- [Search and Replace Text](#search-and-replace-text)
- [Send Email](#send-email)
- [License](#license)
- [Resources](#resources)
- [Credits](#credits)

## Getting Started

Each Batch File (located in the [source](./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.

> [!TIP]
> 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](./source/Backup_Folder.bat)

### Check Website

Check if an endpoint is reachable.

> [Check_Website.bat](./source/Check_Website.bat)

### Create Event Log

Create an Error Event Code in Windows Event Viewer.

> [Create_Event_Log.bat](./source/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](./source/Enable_or_Disable_Scheduled_Task.bat)

### FTP Transfer

Transfer files from a FTP Server to a Local file location.

> [FTP_Transfer.bat](./source/FTP_Transfer.bat)

### Kill Running Program

Kill a running task.

> [Kill_Running_Program.bat](./source//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](./source/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](./source/Move_Files_Outbound.bat)

### Network Status

Endlesslly ping an endpoint and record the network drops in a log file.

> [Network_Status.bat](./source/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](./source/Search_and_Replace_Text.bat)

### Send Email

Send an email from a batch file via Powersell.

> [Send_Email.bat](./source/Send_Email.bat)

## Resources

- [Batch File](https://en.wikipedia.org/wiki/Batch_file)
- [Batch File Commands](https://ss64.com/nt/)
- [Batch File Tutorial](https://www.tutorialspoint.com/batch_script/index.htm)

## 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](https://choosealicense.com/licenses/mit/) provides certain freedoms while preserving rights of attribution to the original creators.
- For more details, see the [LICENSE](LICENSE) file in this repository. in this repository.

## Credits

**Author:** [Scott Grivner](https://github.com/scottgriv)

**Email:** [[email protected]](mailto:[email protected])

**Website:** [scottgrivner.dev](https://www.scottgrivner.dev)

**Reference:** [Main Branch](https://github.com/scottgriv/batch-useful_bat_files)

---------------