Top "Batch-file" questions

A batch file is a text file containing a series of commands that are executed by the command interpreter on MS-DOS, IBM OS/2, or Microsoft Windows systems.

Defining and using a variable in batch file

I'm trying to define and use a variable in a batch file. It looks like it should be simple: @echo …

batch-file cmd environment-variables
How to run a PowerShell script from a batch file

I am trying to run this script in PowerShell. I have saved the below script as ps.ps1 on my …

windows shell powershell batch-file
How can you zip or unzip from the script using ONLY Windows' built-in capabilities?

In Windows you can zip some files by right click → Send to → Compressed (zipped) folder And unzip by double clicking …

windows batch-file zip
How can I run a program from a batch file without leaving the console open after the program starts?

For the moment my batch file look like this: myprogram.exe param1 The program starts but the DOS Window remains …

windows batch-file
'adb' is not recognized as an internal or external command, operable program or batch file

I am trying to run google map v2 on emulator, I am following this tutorial. When I was trying to …

android batch-file adb
Create folder with batch but only if it doesn't already exist

Can anybody tell me how to do the following in in a Windows batch script? (*.bat): Create a folder only …

windows batch-file cmd
How to prevent auto-closing of console after the execution of batch file

What command can I put at the end of a batch file to prevent auto-closing of the console after the …

windows command-line batch-file
Check status of one port on remote host

I need a command line that can check the port status on a remote host. I tried ping xxx.xxx.…

windows batch-file tcp cmd
How to wait in a batch script?

I am trying to write a batch script and trying to wait 10 seconds between 2 function calls. The command: sleep 10 Does …

batch-file
How to code a BAT file to always run as admin mode?

I have this line inside my BAT file: "Example1Server.exe" I would like to execute this in Administrator mode. …

windows batch-file