[Jo...] Posted June 2 Share Posted June 2 I created a report_end bat file below that sends a new pdf report to a network drive for others to look at around the facilty. I put it in the main Inspection folder. No issues other than with IT occasionally. @echo off xcopy "C:\Users\Public\Documents\Zeiss\CALYPSO\workarea\results" "Z:\Powertrain\Lab Operations\QUALITY\Reports" /D /E /Y /C exit Question: Is there a PCM option to do similar. Grab the pdf report and send it elsewhere to a different directory? I've seen copyFile mentioned and a report_end_pcm.txt file mentioned. I guess I'm looking for the command to actually "send" it. Thanks in advance. Link to comment Share on other sites More sharing options...
[Je...] Posted June 3 Share Posted June 3 copyFile("C:\Users\Public\Documents\Zeiss\CALYPSO\workarea\results\NameOfYourReport.pdf", "Z:\Powertrain\Lab Operations\QUALITY\Reports\NameOfYourReport.pdf") copy your report and paste it in the new folder Link to comment Share on other sites More sharing options...
[Jo...] Posted June 3 Author Share Posted June 3 Please sign in to view this quote. Thanks. I just have to add a time stamp or similar somehow so it always copies the last one ran Link to comment Share on other sites More sharing options...
[Jo...] Posted June 3 Author Share Posted June 3 I tried this and it does work for the exact file name, but not the next run. I could probably delete the old file (from C:\) but would like to leave it. I have to figure out some sort of wildcard that or time stamp that differentiates the files coming from C:\ Link to comment Share on other sites More sharing options...
[Je...] Posted June 4 Share Posted June 4 in my inspection_start_pcm.txt I create a date-/time-variable named DatumFile that I use for naming my report-PDFs. I create it like that: Datum = dateInNumbers() Zeit = time() Tag = strElement(1,".",Datum) if len(Tag) == 1 then Tag = text("0",Tag) endif Monat = strElement(2,".", Datum) if len(Monat) == 1 then Monat = text("0",Monat) endif Jahr = strElement(3,".", Datum) Stunde = strElement(1,":",Zeit) Minute = strElement(2,":",Zeit) Sekunde = strElement(3,":",Zeit) ZeitF = Stunde+"_"+Minute+"_"+Sekunde DatumFile = Jahr+Monat+Tag+"__"+ZeitF Where I create the path and the name of my PDFs, I do it like: mypath+"\"+DatumFile+".pdf" when you do it similar, and then use that variable in your copyFile()-command, it will allways take the actual report: vReportName=DatumFile+".pdf" copyFile("C:\Users\Public\Documents\Zeiss\CALYPSO\workarea\results\vReportName", "Z:\Powertrain\Lab Operations\QUALITY\Reports\vReportName") 1 Link to comment Share on other sites More sharing options...
[Jo...] Posted June 4 Author Share Posted June 4 Great Jens thanks! I will give it a try! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in