473,748 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

echo commands & other query

31 New Member
sir , i saw many batch file which contains the first line
@ ECHO OFF

WHAT THIS LINE DOES & WHAT ITS IMPORTANCE IN BATCH FILE.

AND ALSO TELL ME............. ....

How can we execute a single command in many time i.e. we want to create 1000 folder named john. then we write this commands md john in any batch file or command prompt in 1000 times. so there is no any method through we make 1000 folder with only single command

please solve.
Nov 26 '08 #1
5 1830
Nepomuk
3,112 Recognized Expert Specialist
Hi!
To find out what that command does, create two files (say test1.bat and test2.bat) with the following contents:
Expand|Select|Wrap|Line Numbers
  1. ECHO "This is test1.bat"
and
Expand|Select|Wrap|Line Numbers
  1. @ECHO OFF
  2. ECHO "This is test2.bat"
Run both files. Can you spot the difference?

Now, about the "creating 1000 folders" problem, search for "batch FOR loop" (e.g. on Google) - that should answer your question.

Greetings,
Nepomuk
Nov 26 '08 #2
JOHNSHELL08
31 New Member
sir i can not differenceate b/w your two commands ,sir please clears it.
Nov 26 '08 #3
anijos
52 New Member
Batch files allow MS-DOS and Microsoft Windows users to create a lists of commands to run in sequence once the batch file has been executed. For example, a batch file could be used to run frequently run commands, deleting a series of files, moving files, etc. A simple batch file does not require any special programming skills and can be done by users who have a basic understanding of MS-DOS commands.

A good example of a batch file for someone who is more familiar with Windows or the MacOS is to think of a batch file as a shortcut in Windows or an icon on the MacOS. Much like a shortcut, batch files could be used to run one or more commands and/or programs through the command line.

Another example of a very well known batch file is the autoexec.bat, which is a simple boot file loaded each time the computer is loaded on MS-DOS and early Windows computers. This batch file contained all the necessary commands and programs used to run MS-DOS and Windows each time the computer booted.
Nov 26 '08 #4
anijos
52 New Member
Will display a message in the batch file. Such as ECHO Hello World will print Hello World on the screen when executed. However, without @ECHO OFF at the beginning of the batch file you'll also get "ECHO Hello World" and "Hello World." Finally, if you'd just like to create a blank line, type ECHO. adding the period at the end creates an empty line.

@:-Does not echo back the text after the at symbol. This is most commonly used as @ECHO OFF to prevent any of the commands in the batch file from being displayed, just the information needed.


AniJos
Nov 26 '08 #5
Kvod10
7 New Member
One problem that your going to run into making 1000 folders named "John" is that Windows will only allow one folder titled that per directory.

Your going to need to find a way to either create them in seperate directories or have them all named differently i.e. "John1", "John2", "John 3", ect...

If you find a way to do this, please post your final product! I'd love to see what that code would look like in batch

P.S. I would consider looking into another language in order to do something like that. Many languages, when used on windows, have the ability to call batch commands and can alter the commands and call them again as many times as you allow. Using a language such as C++ or Python would allow you to do a task like this in just a few lines of code
Nov 30 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2911
by: Chris Dean | last post by:
Hi I'm useing the php NUKE CMS and am designing a theme for it. this basically consists of the the main html structure of the page being produced line by line from php echo commands I have a javascript menu system I want to use which is held in an external ..js file so I try to echo out the relevent <script></script> startements to load up this file however it's not showing up on the page - however the static html version of the
1
2685
by: xtra | last post by:
Hi Folk I have written a module that allows you to type a bunch of commands in the immediate window, for quick access to information when you are creating VB code. Here it is, it may be helpful to you (I find it pretty fast and friendly).... Some of it is specific to my database (I left out many as well which were too specific), so you will have to rewrite it for yours, but you may find it useful.... Any questions, please ask. Typing...
1
10874
by: Ennio-Sr | last post by:
Hi all! I'm writing a script that presents the user with a numbered lines menu, each line corresponding to a <case n> which executes a psql command. As the psql-commands are very similar to each other (all of them have the structure: 1.- psql mydb -x -c "SELECT * FROM tb_nm WHERE col_nm LIKE '%$k_r%'" ) I thought it was possible to shorten it, initializing a str with said command at the beginning of the script and limiting the...
1
5397
by: matthias | last post by:
I have to execute fairly large batch files (200-300MB) with several million INSERT commands. When I do that from pgsql using the \i switch, I get the echo INSERT 0 1 for every single insert statement of my batch file. Since I assume that this slows down the whole process I would like to know if there is a way to suppress that echo and only get error messages and
12
5144
by: Selva Chinnasamy | last post by:
Hi I am using batch commands against Ms-Access and getting an error Message "Characters found after end of SQL statement." String Here is my sql Dim str_screens As String = "Select * from Screens Order by ScreenName;Select * from Functions" How can I fix this problem. Any help is greatly appreciated. Selva
10
2112
by: M | last post by:
Hi, Suppose you have the situation where you have say 20 blocks of text (~250 chars each) in a MySQL db that you need to display, but each has a condition to check to see whether you should display it or not. As far as I can see, you have 2 options: 1. A continuous block of php, with all the text displayed via echo commands 2. Or jumping in and out of php for each block of text i.e.
1
1558
Odisey
by: Odisey | last post by:
Hello, I am still getting these concepts. Help me learn. What is wrong here? Most echos are for testing. Thank you, Odisey <?php #index php script 3.4
4
2012
by: rawky1976 | last post by:
Hi, I have a hyperlink which goes to the page below and passes the PK_ID from a query into 'userid'. From this we query the DB and then echo a table with a form; only the textboxes are already populated with the data from the query (in theory)!!! But I get a blank page! I have error reporting on php and mysql but nothing is displayed? <?php echo "<form method=\"post\" action=\"\" style=\"padding-left: 10px\">"; ...
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9552
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8245
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4877
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.