Monitor Shell Copy File Progress
Alex Tweedly
alex at tweedly.net
Sat May 22 20:26:53 EDT 2010
First thought : I thought (according to Dictionary) that "shell" would
wait until the command was complete before returning - dictionary says
> The current handler pauses until the shell returns its result. If the
> command was successful but did not return anything, the shell function
> returns empty.
Second try : why take a checksum, why not just use the file size ?
Getting the checksum may involve copying the file from the remote server
into your laptop to calculate the checksum.
Third try : instead of doing "shell 'cp file ....' " could you do
load url ("file:" & tRemotepathname)
.... check the cachedURLs ....
put url("file:" & tRemotepathname) into url('file:" & tLocalfilename)
-- Alex.
On 22/05/2010 23:35, Sivakatirswami wrote:
> 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
>
>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list