AllInWorld99 provides a reference manual covering many aspects of web programming, including technologies such as HTML, XHTML, CSS, XML, JavaScript, PHP, ASP, SQL,FLASH, jQuery, java, for loop, switch case, if, if else, for...of, for...in, for...each,while loop, blogger tips, blogger meta tag generator, blogger tricks, blogger pagination, client side script, html code editor, javascript editor with instant output, css editor, online html editor, materialize css tutorial, materialize css dropdown list,break, continue statement, label,array, json, get day and month dropdown list using c# code, CSS button,protect cd or pendrive from virus, cordova, android example, html and css to make android app, html code play,telerik show hide column, Transparent image convertor, copy to clipboard using javascript without using any swf file, simple animation using css, SQL etc. AllInWorld99 presents thousands of code examples (accompanied with source code) which can be copied/downloaded independantly. By using the online editor provided,readers can edit the examples and execute the code experimentally.


     In the following tutorial explain you to create more directory using DOS command through batch files (.bat), you can create 100 of folder (directory) in double click.

Steps:
  1) First you need to set echo off for hide the parent directory.
  2) Pause command is used to pause the execution temporary.
  3) Set statement is used to assign a value to variable (eg: set a=1)
  4) If statement is used to check the condition and continue the execution, else then execute from the next line (eg: if %a% LSS 31 md %a%)
 Conditions are check using the following method
               EQU : Equal
                NEQ : Not equal

                LSS : Less than <
                LEQ : Less than or Equal <=

                GTR : Greater than >
                GEQ : Greater than or equal >=

                This 3 digit syntax is necessary because the > and <
                symbols are recognized as redirection operators
5) Goto is used to transfer the execution to another label.

The code is
echo off
pause
set a=1;
set b=30;
echo %b%
:Rept
if %a% LSS 31 md %a%
 set /a a+=1
if %a% LSS 31 goto Rept
cls
set /a a-=1
echo                           %a% Directory Created Successfully
pause

Screenshots:-

command prompt batch file programCreate more folder using dos command

0 comments:

Post a Comment

Total Pageviews