Collections:
Other Resources:
%1 and %* - Receive Parameters in Batch File
How to receive parameters in batch file?
✍: FYIcenter.com
If a batch file is invoked with parameters, you receive them in special variables:
Here is batch file called, Batch-File-Parameters.bat, that displays those special variables holding batch file parameters:
@echo off echo (%0) echo (%1) (%2) (%3) (%4) (%5) echo (%*)
if you run the above batch file with different parameters, you get:
C:\fyicenter>Batch-File-Parameters.bat 1 2 3 4 5 (Batch-File-Parameters.bat) (1) (2) (3) (4) (5) (1 2 3 4 5) C:\fyicenter>Batch-File-Parameters.bat 1+2 3+4-5 (Batch-File-Parameters.bat) (1+2) (3+4-5) () () () (1+2 3+4-5) C:\fyicenter>Batch-File-Parameters.bat "1 2" 3 "4 5" (Batch-File-Parameters.bat) ("1 2") (3) ("4 5") () () ("1 2" 3 "4 5")
⇒ Space - Delimiter for Batch File Parameters
⇐ "echo on|off" - Control Echo Setting
2021-07-10, 2020🔥, 0💬
Popular Posts:
Checking FTP Server Log File If you look the settings, you will find out that the log file is locate...
How to stop a Windows XP service getting started automatically at system startup time, or disabling ...
What files are used by Windows Live Toolbar for Internet Explorer (IE) browser? How Alexa Toolbar is...
How do I improve the touch sensitivity on my PC 1. Adjust the pen and touch settings in the Control ...
What is "IKE and AuthIP IPsec Keying Modules" in my Windows XP service list? And how is "IKE and Aut...