You need to send a PRN file to the installed printer to get a print-out of the document. Sometimes you need to create a PRN file when you have created some useful document and find that there is no printer installed or the printer is not working. PRN file is particularly helpful in situations where you are not allowed to open personal files on the computers. You need to take a print out of your resume but do not want to open it in a shared network environment in the office. The PRN contains all the information including driver command that is understood only by a printer. You can open this file in a Notepad but it consists of all the characters or other text not understandable by humans. The only thing you can do is to copy this file to a USB drive or send it to another system on a network where the access to a printer is available. Follow the steps below to send PRN file to a printer.
Using Command Prompt
Network Printer
In case you have shared the printer on a server in a network, you need to copy the path of this printer. Go to control panel>Devices and printers.
Now you can see that a printer installed on the network will be like Printer-name on \\Server-name or printer-name on \\IP-address.
Now right click the start button in windows OS and navigate to the command prompt(admin). Open it and type the following command.
COPY F:\Filename.PRN /B \\Server_Name\Printer_Share_Name
Note If the Network printer is installed using an IP address, you need to replace Server_Name with the IP address of the server like \\192.168.1. xx
Here F is the source drive where you have your PRN file. It can be a computer partition drive or a USB drive letter.
The filename is the name of the PRN file you have saved.
Server_name is the computer in the network on which printer is installed.
Printer_Share_Name is the printer’s name. For example, HP LaserJet or Epson-L220, etc.
Local Printer
If you are on a computer where the printer is directly installed on it. You just have to replace the Server_Name with the Computer_Name.
To find the computer name, go to Desktop and right click on My-Computer. Here you will find the Desktop Name which is your computer’s name.
Copy the computer’s name and use it in the command.
COPY F:\Filename.PRN /B \\Computer_Name\Printer_Share_Name
Bonus Tip: How to create a PRN file in windows 10
Go to control panel>Devices and Printers.
Right click on your default printer and click printer properties. Now find the tab named Ports. Now select the port named FILE: Print to file. Click Apply and OK
To create a PRN file, open the document and from the file menu, click on print and it will ask for the filename and location where you want to save this PRN file.
That’s it.
Tom says
Hey, thanks for the article. I had pjl configuration file and couldnt figure out how to get it into the printer, old piece of crap, HP 1200. I shared the printer, renamed the file to .prn and used your command. Neat.
Kruti Salot says
Hi, Thanks for Article.. We are using the same method to print Barcode Labels using PRN file and print using batch file.
But, now the problem is, Our client is telling that Print will not be in the shared mode. So our code is not working.. Is there any solution.. how to achieve using ” allow direct-to-IP printing” policy..
Please reply assp. it’s very urgent.
thanks for help..