What is the Command Line?

The definition of command line


Command Line Explained

The command line is a direct way to communicate with your computer to take action. You essentially command your computer using the language it knows. There is a huge list of things the computer can do (file, network, hardware operations etc.). To keep things simple, at Softinterface, we are really only interested in how to command the computer to use our document conversion and comparison software tools.

 

There are several ways to begin the running/execution of an application.  In the Windows operating system, most people start software programs the same way, by double or single clicking on the appropriate icon, or menu item within the Windows desktop.  However, the same can be accomplished by commanding the operating system to run the program with textual commands within what is called the 'command prompt'.  In Windows you can begin the command prompt by going to the "Start\Programs\Accessories\Command Prompt" menu item.



The command prompt goes further back than the days of DOS (Disk Operating System) where all things were done by textual commands. COPY, DELETE, MOVE are just several of the available programs that could be executed.  COPY for example, required additional information to run, like what to copy and where.  Informing the COPY program of this additional information is done by passing command line parameters.   So for example if I wanted to copy the source file: "C:\MyDirectory\MyFile.TXT" to the directory "D:\MyTemp\" one would type the following into the command prompt:


copy c:\MyDirectory\MyFile.TXT D:\MyTemp <RETURN>


command line defintion example


In addition to the programs provided by the operating system, programs such as 'Diff Doc' and 'Convert Doc' can also be launched in this manner.


Batch Files

In many cases a whole series of commands is issued by the user through the command line interface.  If this is done often, it can become laborious to retype the same commands in every time.  For this reason, the command prompt has the ability to process batch files.  Batch files are text files with a list of commands to be issued to the computer.  The operating system reads from the top of the batch file, and ends at the bottom, executing each line sequentially.  The operating system recognizes batch files as having the *.BAT extension. 


So for example if I wanted to copy 3 files to 3 different locations on a frequent basis I might have to type in the following commands in the command prompt (every time):


copy c:\MyDirectory\MyFile.TXT D:\MyTemp <RETURN>

copy c:\MyDirectory2\MyFile2.TXT D:\MyTemp2 <RETURN>

copy c:\MyDirectory3\MyFile3.TXT D:\MyTemp3 <RETURN>


The smart thing to do however, is to launch notepad, type the 3 commands as shown above, and save it as Copy3Files.BAT.  Then, any time I want to do those 3 copies, I would simply type:


Copy3Files.BAT


at the command prompt.  Double clicking on the batch file within the Windows Explorer also will initiate the batch process.


Leveraging the Command Line

So, how can the fact that a 3rd party program allows for command line execution help you?  As shown in the 3 file copy example above, using the command line facilitates the automation of time consuming processes.  Furthermore, there are applications which allow for the launching of other applications through this mechanism.  It is all about saving time and reducing keystrokes and clicks.


On a final note, the Windows built in Task Scheduler is an example of a very useful tool that can be used to initiate command line/batch file processes. For more information see:
Using the Task Scheduler with Softinterface

Still have questions? Please do ask, we will respond immediately.


EMail

Most responses are within hours At most 24 hours.



Chat

7 AM to 5 PM PST

               

Address

We are located in Los Angeles County

    938 Lincoln Blvd #6

    Santa Monica, CA

    90403

    United States of America

Call

7 AM to 5 PM PST

    TEL: Tel: +1 323 999 1157