# Bartender - Rename file 0 kb **Category:** [Epicor ERP 9](https://www.epiusers.help/c/e9/7) **Created:** 2016-12-12 20:37 UTC **Views:** 2794 **Replies:** 26 **URL:** https://www.epiusers.help/t/bartender-rename-file-0-kb/36589 --- ## Post #1 by @cchang Has any one seen where in Bartender when the .txt file is generated and gets renamed by Commander, the file gets renamed but the file size is set to 0 kb and does not print? We can print directly from Bartender but not when the file gets renamed with a 0 kb file size. --- ## Post #2 by @jgiese.wci What version of BarTender? Joshua Giese Technology Solutions : CTO Direct Phone: 920.593.8299 Office Phone: 920.437.6400 x342 [http://wcibags.com/email/emailFooter4.jpg] [http://68c6d48672d1935cd6dd-141aaade86a30aeaf83cb6aee3728aaa.r82.cf1.rackcdn.com/images/global/Holiday-Schedule-2016.jpg] --- ## Post #3 by @cchang Version: 9.4 SR3 Build: 2871 OS: Windows Server 2008 (x64) R2, SP1 --- ## Post #4 by @jgiese.wci Dang that’s an old version. Those 9.x’s were a bit flakey. Was it purchased from Epicor? I would jump to BarTender 10.1 if you can do it at no additional cost before troubleshooting anything. Just make sure you don’t go to the absolute latest version it doesn’t always play nice in my experience. It has some good concepts just needs a bit of time. Joshua Giese Technology Solutions : CTO Direct Phone: 920.593.8299 Office Phone: 920.437.6400 x342 [http://wcibags.com/email/emailFooter4.jpg] [http://68c6d48672d1935cd6dd-141aaade86a30aeaf83cb6aee3728aaa.r82.cf1.rackcdn.com/images/global/Holiday-Schedule-2016.jpg] --- ## Post #5 by @cchang When we manually upload the .txt file, it renames it correctly and prints. It is only happening at the time of generating the .txt file automatically that it renames it incorrectly. Seems to be happening with one particular customer label and not others and just started happening recently. --- ## Post #6 by @jgiese.wci Find out what’s different about that Label. Epicor will output the file the same for every single one. I would suspect the RDD unless it’s been custom coded. Joshua Giese Technology Solutions : CTO Direct Phone: 920.593.8299 Office Phone: 920.437.6400 x342 [http://wcibags.com/email/emailFooter4.jpg] [http://68c6d48672d1935cd6dd-141aaade86a30aeaf83cb6aee3728aaa.r82.cf1.rackcdn.com/images/global/Holiday-Schedule-2016.jpg] --- ## Post #7 by @Chris_Conn If you turn off processing in Bartender - does the text file appear properly? (I.e is the failure caused by Epicor or the processing in BT) If it does, does the label file it references on the top line exist? May want to just double check the report data definitions for that label as well. --- ## Post #8 by @cchang The text file appears but then gets renamed and consumed upon the Detection process in Commander. Once the file gets renamed, the file is 0 kb so there is nothing in the file to reference the top line exists. Is it possible the text file is actually 0 kb upon generating or when it gets renamed, it gets converted to 0 kb. --- ## Post #9 by @Chris_Conn Seems like I saw that happen before. What happens if you disable commander temporarily? --- ## Post #11 by @cchang It looks like if we print multiple tags, the first two prints but the last one's don't print correctly when the trigger file gets renamed with a 0 kb file size. --- ## Post #12 by @Chris_Conn File access issue? If BarTender (BT) is processing, and you try to write, it's going to fail. Perhaps a delay is in order --- ## Post #13 by @cchang Where do we set the delay for when printing multiple tags? --- ## Post #14 by @Chris_Conn Good question. Are you using autoprint to generate the BT files or doing it all manually with C#? Also, can you clarify "print multiple tags" - Do you mean same tag several times (print qty), or several different tags? --- ## Post #15 by @cchang I believe we are using the autoprint process in the custom code. Where is the delay set in the autoprint? --- ## Post #16 by @cchang In our Pack ID if there are multiple lines such as 11 lines, it will generate 4 tags since all 11 lines can't fit into one tag. So it is different tags for different lines on the same Pack ID. --- ## Post #17 by @Chris_Conn I need someone to tell if me if this is bad advice (@josecgomez.trigemco @Bart_Elia): F the issue is a BPM is triggering too fast MAYBE we could insert a small delay at the end of BPM processing using C# code. Honestly I don't understand how the firing of the BPMs work, whether more than one of the same type can be active at once. It's a thought. :cry: Yep bad advice lol Of course you didn't say this was in a BPM, is this a manual print? Personally, I was not happy with the way BT and Epicor played so I decided to manually create my BT trigger files with C# code. If you go that route, you have full flexibility over everything, including timing) --- ## Post #18 by @josecgomez Yeha this is a bad idea :-) don't slow epicor down any more than you have to LoL This is a long thread and I am tired... SIGH I'll see if I can make time to read it later --- ## Post #19 by @josecgomez ok it wasn't that long I was just being lazy Anyways a few questions 1) If you turn off Commander and run the auto print and you look at the fire before its renamed, is the file ok then? 2) What does your Epicor setup look like? Are you using Auto print? Can you show us your setup? --- ## Post #20 by @cchang Where is the auto print setup in Epicor to provide the setup info? I believe commander just renames it exactly as is...so if the file gets generated as 0 kb it isn't an issue with commander? --- ## Post #21 by @josecgomez Maybe ... But it would be good to verify . If you can turn off commander and look at the file before is renamed... Just to cover your basis --- ## Post #22 by @bw2868bond http://forums.seagullscientific.com/index.php?/topic/5341-bartender-stops-printing-after-2-labels-windows-error-1804-bartender-error-3721/ --- ## Post #23 by @Chris_Conn @bw2868bond nice find --- ## Post #24 by @cchang We believe it might be Commander that is causing the issue since we do have tags that are printing multiple tags correctly so it might not be a Windows patch. Where do we set the Delay in Bartender or Commander? --- ## Post #25 by @cchang We verified that with Commander disabled, it works correctly but with Commander disabled not all the tags are printing. We do have a picture in the tag so I'm not sure if is the memory size of the tag file that is causing the issue within Commander. Any thoughts as to why Commander is not able to rename the files correctly with the correct file size when enabled? --- ## Post #26 by @jgiese.wci I've generally found BarTender support to be very good, what did they say about it? --- ## Post #27 by @Chris_Conn Did you ever get this resolved? If it's a large bartender trigger file being written (a ton of kb's for an image) - could this be happening?: TriggerFile.txt created TriggerFile starts to get written with lots of bytes Bartender notices TriggerFile, attempts to access\rename it while OS is still writing Looks like under task properties in commander you can try some changes: You could set the scan to polling and set a time for that to occur, or you could try increasing the locked-file timeout --- ## Post #28 by @cchang Yes this issue did get resolved. We believe it was due to a latency in the network when retrieving the picture and the file getting written. When we tested with changing the polling interval, it resolved it in both our test and production environments but left it as immediate detection in production and it is working fine so far. --- **Canonical:** https://www.epiusers.help/t/bartender-rename-file-0-kb/36589 **Original content:** https://www.epiusers.help/t/bartender-rename-file-0-kb/36589