Page 1 of 2
Batch Scripting
Posted: Fri Oct 08, 2010 12:20 pm
by Nipuna
I like to know about Windows Batch Scripting.
Can you Guys add a Windows Batch Scripting article to Expertcore ?
Thanks
Re: Batch Scripting
Posted: Fri Oct 08, 2010 1:06 pm
by Saman
Wrong section

Re: Batch Scripting
Posted: Fri Oct 08, 2010 1:34 pm
by Nipuna
Saman wrote:Wrong section

OOps Sorry. My Mistake Thanks for Reminding Me.
Re: Batch Scripting
Posted: Fri Oct 08, 2010 3:22 pm
by Neo
Moved to Windows
Windows PowerShell is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on top of, and integrated with, the .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both local and remote Windows systems.
In PowerShell, administrative tasks are generally performed by cmdlets (pronounced command-lets), specialized .NET classes implementing a particular operation. Sets of cmdlets may be combined together in scripts, executables (which are standalone applications), or by instantiating regular .NET classes (or WMI/COM Objects). These work by accessing data in different data stores, like the filesystem or registry, which are made available to the PowerShell runtime via Windows PowerShell providers. Read more
here.
Download Windows PowerShell
Read more at Microsoft TechNet.
Windows PowerShell starting point in TechNet
Windows PowerShell owners manual.
Re: Batch Scripting
Posted: Fri Oct 08, 2010 6:53 pm
by Nipuna
Thanks Neo,
but I want to know simple things. Like
"Echo off" and more.
You Told a Great One But I want to know Simple ones.
I mean that we can Write on notepad and save as .bat files then can run.
Thanks
Re: Batch Scripting
Posted: Sat Oct 09, 2010 3:06 am
by Neo
Though batch files with .bat extension still works on Windows, that was created for DOS. If you want to know more on it, read
Using batch files.
However, on Windows, there is another way to do it more elegantly. It's called
Windows Script Host.
Example:
WSH sample
Anyway, PowerShell is a very powerful tool that gives more control over standard scripting methods.
Each of these scripting methods address simple to complicated scripting requirements. You will have do Google and find some examples from each to see what suits you the best.
Re: Batch Scripting
Posted: Sat Oct 09, 2010 8:24 am
by Nipuna
I Want know to about simple things. like this
I can't remember exactly
Re: Batch Scripting
Posted: Sat Oct 09, 2010 8:41 pm
by Neo
You don't read posts carefully. See the first link on my previous post. It's about the legacy batch scripting method that you refer.
BTW: It is not
make dir. It is
mkdir.
You can use whatever DOS command within a batch file (.bat). You can get the
List of DOS commands here.
Echo is also a DOS command that usually used to toggle echoing of commands on and off in batch files.
Re: Batch Scripting
Posted: Sat Oct 09, 2010 8:55 pm
by Nipuna
Thanks Neo,
And Sorry for not reading well

By doing those I am eating Up your Valuable time. Really Sorry.
Please Tell me if i am a Trouble to you.
Re: Batch Scripting
Posted: Sun Oct 10, 2010 3:12 pm
by Neo
Please Tell me if i am a Trouble to you.
If that is the case, I'll tell you personally
However read carefully, especially the referring links and all. Normally we spend quite a lot of time on answering posts. It is not easy as we have to go through several pages and read whether it matches you, etc... I'm sure no one will be happy if same question is asked without reading previous post(s). Since you need to become an engineer on day, you need to understand that you will have to spend considerable time on reading and learning carefully.