UDEMY : https://www.udemy.com/course/learn-ba...
Title: BATCH SCRIPTING// LENGTH OF AN ARRAY // Batch Scripting Part 15 LENGTH OF AN ARRAY
In this lesson, you will be learning about LENGTH OF AN ARRAY for Batch Script.
LENGTH OF AN ARRAY: The length of an array is done by iterating over the list of values in the array since there is no direct function to determine the number of elements in an array.
@ECHO OFF
REM LENGTH OF AN ARRAY
SET A[0]=1
SET A[1]=2
SET A[2]=3
SET A[3]=4
SET X=0
:LengthLoop
IF DEFINED A[%X%] (
CALL ECHO %%A[%X%]%%
SET /A X+=1
GOTO :LengthLoop
)
ECHO THE LENGTH OF THE ARRAY IS %X%
PAUSE
Output The above command produces the following output.
1
2
3
4
THE LENGTH OF THE ARRAY IS 4
=======================================================
If you have any questions, please post them. Don't forget to comment, like, rate and subscribe
=====================================================
Batch file programming tutorial // CREATE BATCH FILE // Batch Scripting Part-1 -- • Batch file programming tutorial // CR...
Batch file programming tutorial // Batch Scripting Part-2 - Basic Batch Commands -- • Batch file programming tutorial // Ba...
Batch file programming tutorial // COPY COMMAND // Batch Scripting Part-3 - COPY Batch Command -- • Batch file programming tutorial // CO...
Batch file programming tutorial // DEL COMMAND // Batch Scripting Part-4 - DEL Batch Command -- • Batch file programming tutorial // DE...
Batch file programming tutorial // MOVE COMMAND // Batch Scripting Part-5 - MOVE Batch Command -- • Batch file programming tutorial //MOV...
Batch file programming tutorial // ATTRIB COMMAND // Batch Scripting Part-6 - ATTRIB Batch Command -- • Batch file programming tutorial // AT...
Batch file programming tutorial // FIND COMMAND // Batch Scripting Part-7 - FIND Batch Command -- • Batch file programming tutorial // FI...
Batch file programming tutorial // VARIABLES IN BATCH SCRIPT // Batch Scripting Part- 8 - VARIABLES -- • Batch file programming tutorial // VA...
DO NOT CLICK // LOCAL AND GLOBAL VARIABLES IN BATCH SCRIPT // Part- 9 - LOCAL AND GLOBAL VARIABLES -- • DO NOT CLICK // LOCAL AND GLOBAL VARI...
BATCH SCRIPTING // STRINGS IN BATCH SCRIPT // Batch Scripting Part- 10 - STRINGS -- • BATCH SCRIPTING // STRINGS IN BATCH S...
BATCH SCRIPTING// LEFT, MID AND RIGHT STRINGS// Batch Scripting Part- 11- LEFT, MID AND RIGHT STRING -- • BATCH SCRIPTING// LEFT, MID AND RIGHT...
REMOVE AND REPLACE IN STRING // Batch Scripting Part 12 REMOVE AND REPLACE IN STRING -- • REMOVE AND REPLACE IN STRING // Batch...
BATCH SCRIPTING// ARRAYS // Batch Scripting Part 13 ARRAYS -- • BATCH SCRIPTING// ARRAYS // Batch Scr...
BATCH SCRIPTING// MODIFY AND ITERATE OVER AN ARRAYS // Batch Scripting Part 14 MODIFY AND ITERATE -- • BATCH SCRIPTING// MODIFY AND ITERATE ...
======================================================
Check out other videos
WEAPONS THAT CAN DEFEAT THANOS -- https://www.youtube.com/watch?v=nvlez
MS PAINT TRICK -- https://www.youtube.com/watch?v=4IvBC
Matrix Effect -- • Matrix Rain Best Trick// Create Matri...
CMD: Wi-Fi Password Hack| Find WiFi Password on Windows 10/8/7/XP -- • Video