<DIV>Thanks Dave,</DIV><DIV>while the exit codes you provided will work fine for the post-install check, my issue was how to check for completeness the next time WPKG runs when a previous attempt failed part way through.</DIV><DIV> </DIV><DIV>Since the file copy wont be rolled back, the initial <Check> command would have to look at either all the files or something that was guaranteed to be copied after the initial install.</DIV><DIV> </DIV><DIV>If Adams suggestion works in that the install commands are always processed in the given order and always one at a time, then I should be able to use it to copy a check file and work off that.</DIV><DIV> </DIV><DIV>I will use your exit codes however for the install/upgrade commands as I was currently only using the 1 return.</DIV><DIV> </DIV><DIV>--<BR signature="separator">
<DIV>thanks</DIV><DIV>-Pat Cahill</DIV><DIV><FONT size=1>M: Berserker Street SS</FONT></DIV><DIV><FONT size=1>T: Glenmore SS</FONT></DIV><DIV><FONT size=1>W: Berserker Street SS</FONT></DIV><DIV><FONT size=1>T: Glenmore SS</FONT></DIV><DIV><FONT size=1>F: Parkhurst SS</FONT></DIV></DIV><DIV> </DIV><DIV> </DIV><SPAN>On 21/08/14, <B class=name>Dave Evans </B><dave.evans@goodness.co.uk> wrote:</SPAN>
<BLOCKQUOTE class=iwcQuote style="PADDING-LEFT: 13px; MARGIN-LEFT: 0px; BORDER-LEFT: #00f 1px solid" cite=mid:53F4D63C.4040404@goodness.co.uk type="cite">
<DIV class="mimepart text plain">you could just rely on the exit code from Robocopy<br /><a href="http://ss64.com/nt/robocopy-exit.html" target=l >http://ss64.com/nt/robocopy-exit.html</A><br /><br />if the exit code is 2 or less, then everything is fine<br />up to 8 some odd things happened<br />above that something went wrong<br />(it's slightly more complicated than that)<br /><br />so you could write<br /><br /> <install cmd="Source_folder Destination_folder [files_to_copy] [options]" ><br /> <exit code="0" /><br /> <exit code="1" /><br /> <exit code="2" /><br /> </install ><br /><br />and that will work<br />if it returns a code >= 3, then as Adam mentions, it will fail the script, and then it will try again the next time<br />if it returns a code <= 2, then the folders are synchronised<br /><br />--------------------------------------------------------------<br />Dave<br /><br />On 20/08/2014 10:05, Adam Thorn wrote:<br />>One option would be to have<br />><br />><install cmd='robocopy SOURCE DESTINATION' /><br />><install cmd='robocopy foo.finished DESTINATION '/><br />><br />>and then check for the existence of (or the size of, or modification time of) foo.finished in the destination folder. If the "main" robocopy in the first <install> is interrupted, it'll resume from where it left off the next time wpkg runs. Only after that robocopy has finished will you then copy foo.finished, at which point you can be confident that everything has copied.<br />><br />>Adam<br />><br />>On 20/08/2014 04:48, Patrick CAHILL wrote:<br />>>Hi All,<br />>>I want to make sure I am doing this in the best possible way.<br />>>I have a few packages that are just folder copying.<br />>>They have either just documents or shortcuts, nothing thats actually<br />>>installed or must be present for the entire package to be considered<br />>>complete.<br />>>I am unsure of the best WPKG Check to make sure the entire folder<br />>>structure has come down.<br />>>Things I am unsure of:<br />>>If RoboCopy doesnt copy the entire folder, I dont think that RoboCopy or<br />>>WPKG rolls back the failed copy and deletes those files/folders which<br />>>leads me to...<br />>>I cant use Check File exists since each file is independant of the<br />>>others and the presence of a particular one doesnt mean the entire<br />>>package is there (well I could but I would have to write a check for<br />>>each file in the folder bleh)<br />>>I cant use Check Folder exists because the folder contents might not be<br />>>completely copied.<br />>><br />>>Several options I have seen that might work in a Check Execute:<br />>>Windows command "COMP", will compare two folders but will not recurse<br />>>subdirectories which will make the command file more complex.<br />>>RoboCopy /e /l /log:, will recurse but the log file will have to be parsed<br />>>Does anyone know of the best way to do this?<br />>>-- <br />>>thanks<br />>>-Pat Cahill<br />>>M: Berserker Street SS<br />>>T: Glenmore SS<br />>>W: Berserker Street SS<br />>>T: Glenmore SS<br />>>F: Parkhurst SS<br />>><br />>><br />>>------------------------------------------------------------------------- <br />>>SSLrack gives free SSL certificates for open source projects (and cheap for everyone else)!<br />>><a href="http://www.sslrack.com/promo/free-ssl-certificates-open-source-projects" target=l >http://www.sslrack.com/promo/free-ssl-certificates-open-source-projects</A><br />>><br />>>------------------------------------------------------------------------- <br />>>wpkg-users mailing list archives >> <a href="http://lists.wpkg.org/pipermail/wpkg-users/" target=l >http://lists.wpkg.org/pipermail/wpkg-users/</A><br />>>_______________________________________________<br />>>wpkg-users mailing list<br />>>wpkg-users@lists.wpkg.org<br />>><a href="http://lists.wpkg.org/mailman/listinfo/wpkg-users" target=l >http://lists.wpkg.org/mailman/listinfo/wpkg-users</A><br />>><br />><br />>-------------------------------------------------------------------------<br />>SSLrack gives free SSL certificates for open source projects (and cheap for everyone else)!<br />><a href="http://www.sslrack.com/promo/free-ssl-certificates-open-source-projects" target=l >http://www.sslrack.com/promo/free-ssl-certificates-open-source-projects</A><br />><br />>-------------------------------------------------------------------------<br />>wpkg-users mailing list archives >> <a href="http://lists.wpkg.org/pipermail/wpkg-users/" target=l >http://lists.wpkg.org/pipermail/wpkg-users/</A><br />>_______________________________________________<br />>wpkg-users mailing list<br />>wpkg-users@lists.wpkg.org<br />><a href="http://lists.wpkg.org/mailman/listinfo/wpkg-users" target=l >http://lists.wpkg.org/mailman/listinfo/wpkg-users</A><br /><br />-------------------------------------------------------------------------<br />SSLrack gives free SSL certificates for open source projects (and cheap for everyone else)!<br /><a href="http://www.sslrack.com/promo/free-ssl-certificates-open-source-projects" target=l >http://www.sslrack.com/promo/free-ssl-certificates-open-source-projects</A><br /><br />-------------------------------------------------------------------------<br />wpkg-users mailing list archives >> <a href="http://lists.wpkg.org/pipermail/wpkg-users/" target=l >http://lists.wpkg.org/pipermail/wpkg-users/</A><br />_______________________________________________<br />wpkg-users mailing list<br />wpkg-users@lists.wpkg.org<br /><a href="http://lists.wpkg.org/mailman/listinfo/wpkg-users" target=l >http://lists.wpkg.org/mailman/listinfo/wpkg-users</A><br /></DIV></BLOCKQUOTE>
<DIV> </DIV>