Monitor Shell Copy File Progress

Sivakatirswami katir at hindu.org
Sat May 22 18:35:49 EDT 2010


Work working on an in-house file manager - RCS for Indesign (since Adobe 
did an "end of life" for Version Cue)

It's coming along well, in fact really well.

One challenge is that I'm using  lots of these:

   put ("mv " & quote & gLocalFilePath & quote &" "& quote & 
(gLocalProjectPath& "/"& tShortFileName) & quote) into tShell
    get shell (tShell)

    put ("cp " & quote & (gLocalProjectPath& "/"& tShortFileName) & 
quote &" "& quote & (gServerProjectPath& "/"& tShortFileName) & quote) 
into tShell
    get shell (tShell)

to more files around and rename them... it works great.

Is there a way to monitor a background shell process like this?

The problem is if you copy from the Big Server on the LAN... to my 
Little MacBook Pro... you won't know when the file is completely copied 
to the local hard drive before doing:

      launch (gLocalProjectPath &"/" & pFileName) with the uInDesignPath 
of this stack

Typically RunRev will issue the unix cp command and then immediately 
launch inDesign, which "crokes" because the file is incomplete on the 
local hard drive.

Now I have some ideas about how to do this: get the checksum some of the 
remote file, do a send in 30 ticks (repeatedly) test of the local file 
until the local file's checksum matches the remote file and then launch it.

But before I go after this, I was wondering if anyone had any other 
method?  Most "cool" would be a progress bar, but I'm not sure RunRev 
can monitor a local unix copy file process....or, if it can, how to do it.

Thanks!
Sivakatirswami








More information about the use-livecode mailing list