Jason Kidman
asked on
.ZPL files to open with .BAT file
I am unable to change .zpl files to open with a .bat file that was created for printing. I go to "open with" and add the check mark to always open with .... and it prints and works great but we have to do that every time. it is windows 10 we are using and I cant figure out how to make all .zpl files when clicked on to auto open the label.bat file. any ideas how to force that to happen as it is not saving label.bat as the program to open all .zpl files with.
I have trouble understanding your question.
For anything else, please post the contents of your BAT file so we can see what you're trying to do.
open with .BAT fileWhat do you mean by that? What does the BAT file need to do with the ZPL file? If the BAT file is just used to print the file, make sure that the line that does the actual printing includes a %1 parameter for the file name.
For anything else, please post the contents of your BAT file so we can see what you're trying to do.
ASKER
This is what is in the .bat file
Net use LPT2: \\%ComputerName%\DevinsLab elPrinter
Copy %1 LPT2
Net use LPT2: /Delete
so if we open the .zpl with this .bat file it prints and works great
but every time we need to click "open with" as it is not saving the open with option to always open .zpl files with this .bat file.
the goal is when we click on the .zpl file it automatically opens the above .bat file ..currently .zpl is not associated with any program and adding the check to always open with lable.bat does nothing as it's not saving the file association.
Net use LPT2: \\%ComputerName%\DevinsLab
Copy %1 LPT2
Net use LPT2: /Delete
so if we open the .zpl with this .bat file it prints and works great
but every time we need to click "open with" as it is not saving the open with option to always open .zpl files with this .bat file.
the goal is when we click on the .zpl file it automatically opens the above .bat file ..currently .zpl is not associated with any program and adding the check to always open with lable.bat does nothing as it's not saving the file association.
ASKER
I think this is a windows 10 issue as windows 7 seems to keep the association
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Maybe look at this:
https://superuser.com/questions/913705/how-to-pass-parameters-in-batch-file-and-zip-the-file-using-7z-exe
The batch file needs to know the name of the file.
Bob