Browsing articles in "Technology"
Nov 4, 2010

How to call a batch file from within another batch file

Have you tried running an external batch file from within a batch file or script, only to find out that the original batch file script prematurely terminates as soon as the external batch script is executed?

For example:

Let’s say we have a main script called “mainscript.bat” and two external scripts called “external1.bat” and “external2.bat”, with “mainscript.bat” having the following lines:

@echo off
c:\testscripts\external1.bat
c:\testscripts\external2.bat

When you try to run the script, you’ll notice that external1.bat will run but external2.bat won’t. This is because external1.bat (the called script) won’t pass the control back to mainscript.bat (the calling script) — which means it won’t get to run external2.bat.

In order to pass the control back to the calling script, you need to use the “CALL” command.

Here’s a simple fix for mainscript.bat:

@echo off
CALL c:\testscripts\external1.bat
CALL c:\testscripts\external2.bat

When you run mainscript.bat,  it will call (run) external1.bat. When external1.bat finishes, it will pass the control back to mainscript.bat. Which will then process the next line on the script — in this case, it will call (run) external2.bat — and so on.

Popularity: 1% [?]

May 22, 2010

Use Google Public DNS and/or OpenDNS to speed up internet access

In relation to my previous post on “How to change Sun Wireless Broadband DNS Settings”, you can choose any of the following DNS servers for fast and reliable DNS name resolution:

Google Public DNS:

DNS1: 8.8.8.8
DNS2: 8.8.4.4

OpenDNS:

DNS1: 208.67.222.222
DNS2: 208.67.220.220

Popularity: 3% [?]

Mar 13, 2010

WordPress for Blackberry

Trying out wordpress app for Blackberry devices.

Cheers! :)

Popularity: 1% [?]

Pages:1234567»

Sponsors

Archives

My mobile site

QR Code - scan to visit our mobile site

Switch to our mobile site