1
I’m having a problem with a company system here which is next. The system generates labels and prints them on an Argox printer, these label printers.
Are tags of requests that are generated with PHP and PPLA that is the language of this printer, the system generates normally perfect labels.
The problem is that we use a. bat file from windows to copy the file. prn to a windows folder and print it right away, and have command to report it after printing.
Follow the code as it is.
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 arrow the printer port, copy to folder and then print the file and then delete.
The problem is that for unknown reasons is that in some random cases it ends up not deleting the label.
What this causes is that in the next label he printed the one that was left in the folder and did not print the current.
I’ve already searched in forums, modified the file 200 times, put if and Else for it only print if there is no file in the folder and many other modifications and nothing solved the problem.
A friend who has more than 10 of experience in this, said that this file is made in this way and that knows no other, and in the forums on the Internet all the posts are codes equal or similar to this.
Another alternative was that I put a timeout of 5 seconds, to check if windows is not messing up in the processes, but even after all this the problem still persists.
Has anyone been there? Or do you have any idea what I can do to solve this problem?
it would not be the case to clean the folder before copying the files into it ?
– Rovann Linhalis
put the command like this: del C: Users Administrator Downloads*. prn /F /Q
– Rovann Linhalis