NetworkClue.com
NetworkClue Home PageHome Contact UsContact ConsultingConsult
Bulletin Board
Internet Services covers Secrets to hosting websites, Hosting your own web server, and using DNS Servers.Operating Systems leads you through the decision of Linux vs. Windows, ideal installations and setups to create an efficient and redundant environment for your business, and great features to make management easier.Routing & Firewalls contains articles that will allow you to take control of your router. Learn how to protect your company with access lists and advanced firewall techniques.Hardware answers the common questions about Switches vs. Hubs, recommends SysAdmin Tools, and recommendations for adequate power protection.Utilities will cover fighting spam, using Anti-Virus programs effectively and the must haves for every administrator's software toolbox.

Bulletin Board

Advanced DOS

By Joshua Erdman
Digital Foundation, inc.

DOS is still being used today, actually it is now called the "command prompt". What? Yeah, I know I just said on the 'Learning DOS' page that DOS is hardly used anymore. DOS commands are still important especially when you get in the more advanced area of computing, especially in scripting. When you combine the power of Windows 2000 and XP System Commands you have a powerful tool for automated tasks to manipulate system environments and perform common tasks on a network.

What is the 'Advanced Area'? That would be the NT kernel found in Windows NT/2000/XP. Although it does not run on or rely on DOS, you can still drop to a command prompt and perform system commands there using the same DOS commands that you hopefully already learned. This is handy when you need to perform a function on many files that fit a specific criteria, for example. All this goes under the area of system scripts. I use scripting all the time when I need to automate jobs on one of my file servers. Then I just have it run the script on a regular basis.

Refer to the list of Windows 2000 and Windows XP commands to see what is available.

Login Scripts

One common script I use is the login script. When network users log in to their system I set their machine to run this little script I created. This script will Map specific network share to a common drive letter so each user can access the correct resources all through the same network path. See the code below:

#file: login.cmd
@echo off
echo   You are logged into %computername%
echo   Now connecting your network drives
net use i: \\server\driveshare
echo   done.

Here is another tutorial on DOS

Here is a list of Windows XP/2000 DOS Commands

Scripting

Besides the System commands, I also use these other tools to make scripting more interactive:

pause - this will pause the script until the user presses a key

echo - this is used to print a message to the screen

cls - this clears the screen

Use the '#' sign to make notes within your script. The computer ignores the whole line if it starts with the '#' sign.

When I need to do something with a more complicated algorithm, I tend to write it in a language called Perl.  Go to Web Monkey to learn about it.

Article last reviewed: 05/05/2003


del.icio.us

Created by: Digital Foundation, inc.

Copyright © 2002-2005 Digital Foundation, inc.   www.networkclue.com

All content of the NetworkClue website is copyrighted. Articles, notes, outlines, and all other materials may not be stored on the Internet or sold or placed by themselves or with other material in any electronic or printed format in whole or part. However materials may be referenced by links to the site.

 

Related Articles:
Windows 2000/XP
   Commands
DOS Basics

 

Advertise Here