Windows Batch File Tutorials

Q

Where to find tutorials on using Windows Batch File? I want to learn everything about Windows Batch File.

✍: FYIcenter.com

A

Here is a collection of tutorials about Windows Batch File compiled by FYIcenter.com team.

Introduction of Windows Batch File

What Is Windows Batch File

Commands Supported in Batch Files

Hello.bat - First Batch File

Batch File Structure and Syntax

"@" - Stop Echoing the Command

"echo on|off" - Control Echo Setting

%1 and %* - Receive Parameters in Batch File

Space - Delimiter for Batch File Parameters

Quotations in Batch File Parameters

Use Quotation to Protect Space in File Name

Remove Quotation Marks from Parameters

Multiple Quotations in a Single Parameter

Quotation without the Closing Mark

Escape Double Quote in Batch Parameter

cmd.exe - Command Prompt Program

What Is cmd.exe Program

Start cmd.exe Command Prompt

Run cmd.exe at the Command Prompt

Run cmd.exe Program with Options

Windows Command Syntax

Basic Structure of Windows Command

Manage Space in Command Name

Manage Space in Command Option

Default STDIN Stream for Command - Keyboard

Redirect STDIN Stream for Command to File

Redirect STDOUT Stream for Command to File

Redirect STDOUT Stream to the End of File

Input and Output Stream Handler Numbers

Use Handler Numbers with <, >, >>

Combine Output Streams with >&

Pipe STDOUT of Previous Command as STDIN of Next

Run Two Commands Sequentially

Run Second Command If the First Successful

Run Second Command If the First Fails

File Name and File Path

What Is File Name

File Name with or without Drive Letter

File Name with Relative Path or Absolute Path

File Name with or without File Extension

Wildcard Character In File Names

Special File Names Used by Windows

Use NUL to Sink Program Output

Use CON to Enter Data to File

Use CON to Display Data on Screen

Windows Command Examples

Find File with Partial Name with DIR

Find Folder Location with DIR

Using Batch Commands

List Batch Commands

"call" - Run Another Batch File

"call command" vs. "command"

"if" - Run Command Conditionally

"goto" - Change the Execution Flow

"for" - Loop on List of Files

"shift" - Shift Batch Parameters

Working with Parameters and Variables

What Are Batch Parameters

Batch Parameter Modifiers

Get Batch File Path Name Components

Get Batch Parameter as File Path

What Is "for" Loop Parameter

"for" Loop Parameter Modifiers

What Are Batch Variables

What Are Batch Built-in Variables

String Variable Match and Replace

Get Sub-String from Variable

Batch Command Help Reference Documents

"call" Command Help Reference

"copy" Command Help Reference

"del" Command Help Reference

"dir" Command Help Reference

"echo" Command Help Reference

"for" Command Help Reference

"goto" Command Help Reference

"if" Command Help Reference

"mkdir" Command Help Reference

"rmdir" Command Help Reference

"set" Command Help Reference

"shift" Command Help Reference

"start" Command Help Reference

"timeout" Command Help Reference

"tree" Command Help Reference

"xcopy" Command Help Reference

Copyright © FYIcenter.com. All rights reserved. Batch-File v1.01

 

Introduction of Windows Batch File

2017-12-04, 95994🔥, 0💬