I'm having a problem with a system here in the company which is as follows. The system generates labels and prints them on an argox printer, these label printers.
They are labels of the requests that are generated with PHP and PPLA which is the language of this printer, the system generates the tags normally perfect.
The problem is that we use a windows .bat file to copy the .prn file to a windows folder and print it right away, and have the command to flag it after printing.
Follow the code.
NET USE LPT1 \PEDIDOS-PC\Argox /Persistent:YES
NET VIEW \PEDIDOS-PC
print C:\Users\Administrator\Downloads\etiqueta.prn lpt1
del C:\Users\Administrator\Downloads\etiqueta.prn
del C:\Users\Administrator\Downloads\*.prn
NET USE LPT1 /DELETE
exit
It arrows the printer port, copies to folder, and then prints the file and then deletes it.
The problem is that for unknown reasons is that in some random cases it does not delete the label.
What this causes is that on the next label he printed the one that was in the folder and did not print the current one.
I already search in forums, I modified the file about 200 times, I put if and else for it to print only if there is no file in the folder and many other modifications and nothing solved the problem.
A friend who has more than 10 experience in this, said that the file is done in this way and that knows no other, and in the forums on the internet all the posts are codes that are the same or similar.
Another alternative was that I put a timeout of 5 seconds, to check if windows is not getting in the way, but even after all this the problem still persists.
Has anyone ever gone through this? or do you have any idea what I can do to solve this problem?