A Home for Snippets of all the Batch Scripts I made over Time.
Script that checks if it was started with Admin Privileges.
Pass Arguments to the Batch Script and save them in Variables.
Query all files in a Folder and check if they contain a certain Searchterm.
Single and Multi Line FOR LOOP Snippets and a List Declaration.
Single and Multi Line IF ELSE Snippets and GOTO calls.
Get the current Date and Time from WMIC and create a formatted String from it to use for Console Output, Folder- and Filenames etc.
Call a Python Script from a Path relative to the Batch Script using a Python Executable from a Path relative to the Batch Script.
Create a Backup of an Sql Server Database.
Restore an Sql Server Database from a Backup File.
Create a Backup of a Drive on your Windows Computer.
Export the Windows Event Logs from a specified Timeframe.