Monitor Shell Copy File Progress

Web Admin Himalayan Academy katir at hindu.org
Sat May 22 21:26:01 EDT 2010


Aloha, Alex:

Nalla Cintanai (Tamil for "good thoughts" also the name of a famous book 
in our tradition)

Hmmm, I will have to test that "wait" for shell completion. I'm not 
seeing that behavior at the moment, it sure seems like the next line 
runs immediately.

  I'll throw in an a put statement dialog immediately and watch.

I think libURL uses the HTTP protocol. I'm thinking AFP will be faster 
and "better"

Yes, Filesize, Oh, right... checksum is the wrong thing. I  meant to 
parse the detailed files and use that.



On 5/22/10 2:26 PM, Alex Tweedly wrote:
> 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:
>> I'm using  lots of these:
>>
>>    put ("cp " & quote & (gLocalProjectPath& "/"& tShortFileName) & 
>> quote &" "& quote & (gServerProjectPath& "/"& tShortFileName) & 
>> quote) into tShell
>>    get shell (tShell)
>>
>> to more files around
>>
>> 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. 




More information about the use-livecode mailing list