[wpkg-users] Best practice for Copying a folder and the WPKG Check that its correct

Adam Thorn alt36 at cam.ac.uk
Wed Aug 20 11:05:41 CEST 2014


One option would be to have

<install cmd='robocopy SOURCE DESTINATION' />
<install cmd='robocopy foo.finished DESTINATION '/>

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.

Adam

On 20/08/2014 04:48, Patrick CAHILL wrote:
> Hi All,
> I want to make sure I am doing this in the best possible way.
> I have a few packages that are just folder copying.
> They have either just documents or shortcuts, nothing thats actually
> installed or must be present for the entire package to be considered
> complete.
> I am unsure of the best WPKG Check to make sure the entire folder
> structure has come down.
> Things I am unsure of:
> If RoboCopy doesnt copy the entire folder, I dont think that RoboCopy or
> WPKG rolls back the failed copy and deletes those files/folders which
> leads me to...
> I cant use Check File exists since each file is independant of the
> others and the presence of a particular one doesnt mean the entire
> package is there (well I could but I would have to write a check for
> each file in the folder bleh)
> I cant use Check Folder exists because the folder contents might not be
> completely copied.
>
> Several options I have seen that might work in a Check Execute:
> Windows command "COMP", will compare two folders but will not recurse
> subdirectories which will make the command file more complex.
> RoboCopy /e /l /log:, will recurse but the log file will have to be parsed
> Does anyone know of the best way to do this?
> --
> thanks
> -Pat Cahill
> M: Berserker Street SS
> T: Glenmore SS
> W: Berserker Street SS
> T: Glenmore SS
> F: Parkhurst SS
>
>
> -------------------------------------------------------------------------
> SSLrack gives free SSL certificates for open source projects (and cheap for everyone else)!
> http://www.sslrack.com/promo/free-ssl-certificates-open-source-projects
>
> -------------------------------------------------------------------------
> wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/
> _______________________________________________
> wpkg-users mailing list
> wpkg-users at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/wpkg-users
>




More information about the wpkg-users mailing list