Rename, copy and delete data from trigger file.
I'm trying to delete the first 2 rows from my trigger file, which I can get to work, but I then want to rename the file and copy it to another folder. When I try to do all this together it's not working. Does the action order make a difference? I have tried it a bunch of different ways. Can someone help?
-
Peter Thane
★ BarTender Hero ★
Yes as you have already copied the file before you are trying to delete the lines.
Depending what is included in your data at the end of line 2/start of line I just used a File integration that waits for the trigger file reads the data as normal as the %Event Data% and then deletes the original file. I added a search and delete before command to delete line 1 and 2 and the a Write file command to write the revised %Event Data% out to a new file in a new location
0 -
Shanna Frank
★ BarTender Hero ★
Ok, Here is another question, what is the best solution to set this up. They problem we are having is we may need to change the printer and to be able to tell it how many copies we want. With there being so many different ways to do this I'm not sure the best solution.
I have a file integration using a print command script. but it's using my default printer instead of the printer int he file. Here is a copy of my trigger file as well. Any help to get this one going all the rest I have to do will fall in place. Thank you in advance.
%BTW% /AF="C:\Junk\Rec_Lbl_Bar_2024.btw" /D="<Trigger File Name>" /PRN="\\receiving-pc2\RecLbl" /DBTEXTHEADER=3 /R=3 /P
%END%
"_RcvHead_RptLanguageID","_RcvHead_Company","_RcvHead_PackSlip","_RcvHead_PONum","_RcvHead_PurPoint","_RcvDtl_RptLanguageID","_RcvDtl_BinNum","_RcvDtl_Company","_RcvDtl_IUM","_RcvDtl_LotNum","_RcvDtl_NumLabels","_RcvDtl_PackSlip","_RcvDtl_PartDescription","_RcvDtl_PartNum","_RcvDtl_POLine","_RcvDtl_PONum","_RcvDtl_PurPoint","_RcvDtl_ReceiptDate","_RcvDtl_NumLabels_c","_RcvDtl_SysRowID","_PartLot_RptLanguageID","_PartLot_Company","_PartLot_CureDt","_PartLot_ExpirationDate","_PartLot_LotNum","_PartLot_PartNum"
"enu","LGS","308991","308991","01","enu","MSStage","LGS","Sheet","789","1","308991","MIL-R-6855 CL 1 GR 40 .250""THK X 36"" X 36""","500022.22","1","308991","01","1/24/2024 12:00:00 AM","5","4a3504d1-9497-4cc3-b28e-9018dff2a5ee","enu","LGS","1/22/2024 12:00:00 AM","1/22/2024 12:00:00 AM","789","500022.22"
"enu","LGS","308991","308991","01","enu","MSStage","LGS","Sheet","789","1","308991","MIL-R-6855 CL 1 GR 40 .250""THK X 36"" X 36""","500022.22","1","308991","01","1/24/2024 12:00:00 AM","5","4a3504d1-9497-4cc3-b28e-9018dff2a5ee","enu","LGS","1/22/2024 12:00:00 AM","1/22/2024 12:00:00 AM","789","500022.22"0 -
Peter Thane
★ BarTender Hero ★
Is printer receiving-pc2\RecLbl installed/shared on the machine running the Integration, if not then the Admin Console>Printer Setup printing redirection setting maybe coming into effect?
If you are always printing to the same printer and document you could use the remove the top two lines option above and specify the printer and label to be used in the Print Document tab of the a different File Integration. Alternatively, and if possible, you could these details in the data string and then link these and copies too to these fields again in the Print Document setup, such as per the image below
0 -
Shanna Frank
★ BarTender Hero ★
I'm close. Still getting an error. Here is my process
Let me know if you need to see more. Thank You!
Here is the error message
0 -
Peter Thane
★ BarTender Hero ★
My guess is the search and delete isn't working correctly but you may need to check the FAILED trigger file to check this.
You could try using the Search and Delete Everything Before option and look for "_RcvHead
0 -
Shanna Frank
★ BarTender Hero ★
Sorry for all the back and forth. I'm new to bartender and I think I'm came a long way with just learning this on my own. Thanks again for all your help.
When testing my print action here is what I see
to me everything looks correct. Here is errors i see when it prints
0 -
Peter Thane
★ BarTender Hero ★
The MyDoc variable needs to be just the name of the label format to use and not the rest of the script string
0
Please sign in to leave a comment.
Comments
7 comments