Log in ....Tribune


Dot.ComLatest in ITFree DownloadsOn hardware

Monday, June 25, 2001
Article

Making printing queue move faster
Sarabjeet Singh Kanwal

IT is time when students of most of the computer colleges complete their assignments and make a beeline for taking printouts from the solitary printer. Suddenly this machine that otherwise lies unused throughout the year becomes a venerated object. When after slogging through the line, a student’s turn comes his joy knows no bounds and he spends at least two hours at the terminal to take printouts of a single assignment.

The students make 25-30 programs for assignment of each programming language. Each program is stored in a separate file. To take printouts, the student has to give following DOS command again and again for every file:

"Type file.ext > prn"

Where "file" is the name of program file and "ext" is its extension. In some cases, "LPT1" or "LPT2" is used in place of "prn". Due to this repeated process, a lot of time is wasted that is the main cause of chaos. Here we present 3 different ways to overcome the problem:

 


First alternative:

Make a file abc.bat by writing following statement in it:

"for %%1 in (*.ext) do type %%1 > prn"

Type "abc" at the DOS prompt and press Enter. The command will print all files in the folder with extension "ext" in one go. In this case you will not get a chance to adjust the paper position.

Second alternative:

This alternative works if you have MS Word installed on your PC.

1) Copy all files to be printed in a single directory. In this directory, give a DOS command — "copy *.ext abc.txt". This command will copy all files with extension ext to a single file abc.txt. Now, you will get all programs in a single file.

2) Open abc.txt file in MS Word.

3) Now you may need to make some adjustments so that a program should terminate at the same page from where it started. You can do so by shifting program from end of a page to the next page. You will also get option to adjust font properties and adjust margins of the page.

4) Give print command from file menu and all the programs will be printed in a single go.

Third alternative:

Use this alternative, if you don’t have MS Word installed.

1) Write names of all files to be printed on a piece of paper and count their number. Suppose you have 25 files to be printed.

2) Using Edit command of DOS, create a file abc.bat. In this file, write following two abstract statements:

Type .ext > prn
Pause

Using copy-paste technique, write the above two statements 25 times in abc.bat file. Now, you have 25 file names on the paper and 25 sets of statements in the file. So you will have to write names of all files one by one everywhere before ".ext". Your abc.bat file will appear as follows:

Type file1.ext > prn
Pause
Type file2.ext > prn
Pause
Type file3.ext > prn
Pause

……… and so on.

Don’t leave any blank space within a file name, as DOS doesn’t allow this. For example, don’t write as "file1 .ext".

Now, copy abc.bat file and all files to be printed in a single directory. Go to that directory and type "abc" at DOS prompt and press enter. All statements in abc.bat file will be executed one by one. First of all "file1.ext" will be printed. Then "Pause" statement will prompt you: "Press any key to continue". Before pressing any key, you have time to adjust the paper position on the printer. After pressing a key, the next file ("file2.ext") will be printed. Similarly, you will be able to print all 25 files.

Benefit: Since all students create abc.bat or abc.txt file at their own terminal, there will be no rush at the terminal having printer. When a student goes to the terminal having printer, he will not have to give print command for each file. This will reduce time taken to print assignments to 10 per cent.

Tell this technique to your friends, so that your turn to reach the printer terminal may come early.

Home
Top