Using Shell to copy files
Dave
dave at looktowindward.com
Wed Apr 4 11:45:40 EDT 2007
Sorry, I don't know much about Windows!
All the Best
Dave
On 4 Apr 2007, at 14:04, Nic Prioleau wrote:
> Ok, I have found the problem but not the solution... Perhaps you
> may have an idea...
>
> The server from which I am copying is asking for a username &
> password to gain access. Is there a way to pass the username and
> password?
>
> Thanks again...
> Nic
> ----- Original Message ----- From: "Dave" <dave at looktowindward.com>
> To: "How to use Revolution" <use-revolution at lists.runrev.com>
> Sent: Wednesday, April 04, 2007 2:42 PM
> Subject: Re: Using Shell to copy files
>
>
>> Hi,
>>
>> I've had a look and on the face of it the code seems ok. I only
>> have a Mac, so I can't test it here. One thing I noticed from the
>> docs:
>>
>> Note: In a standalone application the Common library is
>> implemented as a hidden group and made available when the group
>> receives its first openBackground message. During the first part
>> of the application's startup process, before this message is
>> sent, the revCopyFilecommand is not yet available. This may
>> affect attempts to use this command in startup, preOpenStack,
>> openStack, or preOpenCardhandlers in the main stack. Once the
>> application has finished starting up, the library is available
>> and the revCopyFilecommand can be used in any handler.
>>
>> Not sure if this has any bearing.
>>
>> Otherwise, here are some suggestions:
>>
>> 1. add the lines:
>>
>> if there is a file source then
>> answer "There is file:" && source
>> end if
>>
>> to Just before the revCopyFile call.
>>
>> 2. Change the source folder to be on the same Machine as the
>> destination folder as a Test, if this works then it's something to
>> do with the source file being on a different machine.
>>
>> 3. Try it without spaces in the path and name, I've tried it on
>> a mac and it works ok, but don't have a PC.
>>
>>
>> All the Best
>> Dave
>>
>> On 4 Apr 2007, at 12:24, Nic Prioleau wrote:
>>
>>> Hi Dave,
>>> Here's the source....
>>>
>>> put the effective filename of this stack into tLocalPath
>>> set the itemDelimiter to "/"
>>> put "" into item -1 of tLocalPath
>>>
>>> if tempSFile = tempLFile then
>>> if line 5 of thisSLine > line 5 of thisLFile then
>>> put tServerPath & tempSFile into source -- So source
>>> looks like this "\\83.143.28.54\netcaresource\filesToDownload
>>> \AeroMedical.qrl"
>>>
>>> -- And tLocalPath = "C:/Netcare991 Source/"
>>> revCopyFile source,tLocalPath
>>> if the result is empty then
>>> put tempSFile & " File Updated Sucessfully..."&cr
>>> after tempMessage
>>> end if
>>> end if
>>> end if
>>>
>>> Thanks for your assistance there Dave...
>>> Nic
>>> ----- Original Message ----- From: "Dave" <dave at looktowindward.com>
>>> To: "How to use Revolution" <use-revolution at lists.runrev.com>
>>> Sent: Wednesday, April 04, 2007 1:01 PM
>>> Subject: Re: Using Shell to copy files
>>>
>>>
>>>> Hi,
>>>>
>>>> AFAIK it works ok with spaces, paste your code into an email
>>>> and I'll take a look, it works fine for me.
>>>>
>>>> All the Best
>>>> Dave
>>>>
>>>> On 4 Apr 2007, at 11:52, Nic Prioleau wrote:
>>>>
>>>>> Yeah I hear you... Problem is my revCopyFile is returning a 1,
>>>>> so I am not too sure what this means(other than it's in
>>>>> error). Does this command also worry about spaces in the
>>>>> folder names?
>>>>>
>>>>> ----- Original Message ----- From: "Dave"
>>>>> <dave at looktowindward.com>
>>>>> To: "How to use Revolution" <use-revolution at lists.runrev.com>
>>>>> Sent: Wednesday, April 04, 2007 12:38 PM
>>>>> Subject: Re: Using Shell to copy files
>>>>>
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> What problems are you having with the revCopyFile command?
>>>>>> AFAIK it works ok. This is a better way of doing since
>>>>>> depending on what you are doing, using the shell or an
>>>>>> external copy command may cause problems if you open the new
>>>>>> file too quickly.
>>>>>>
>>>>>> All the Best
>>>>>> Dave
>>>>>>
>>>>>> On 4 Apr 2007, at 11:35, Nic Prioleau wrote:
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> having tried, with no result, to copy files using
>>>>>>> revCopyFile, I decided to try and use shell("copy"). The way
>>>>>>> I am doing it may seem a little odd but my syntax is this...
>>>>>>>
>>>>>>> put quote & "copy "&source&space&tLocalPath"e into tTest
>>>>>>> set the hideConsoleWindows to true
>>>>>>> get shell(tTest)
>>>>>>>
>>>>>>> This works fine but only if the folder I am copying to does
>>>>>>> not have any spaces in it's name.
>>>>>>>
>>>>>>> Can someone tell me how I would get around this problem. It's
>>>>>>> obviously a DOS issue but I am not sure of the syntax.
>>>>>>>
>>>>>>> Thanks
>>>>>>> Nic
>>>>>>>
>>>>>>>
>>>>>>> ################################################################
>>>>>>> ## ## ## ###############
>>>>>>> This e-mail message has been scanned for Viruses and Content
>>>>>>> and cleared by MailMarshal
>>>>>>> ################################################################
>>>>>>> ## ## ## ###############
>>>>>>> _______________________________________________
>>>>>>> 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
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>>>>>
>>>>>
>>>>> ##################################################################
>>>>> ## ## ###############
>>>>> This e-mail message has been scanned for Viruses and Content
>>>>> and cleared by MailMarshal
>>>>> ##################################################################
>>>>> ## ## ###############
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>>
>>> ####################################################################
>>> ## ###############
>>> This e-mail message has been scanned for Viruses and Content and
>>> cleared by MailMarshal
>>> ####################################################################
>>> ## ###############
>>> _______________________________________________
>>> 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
>>
>> _______________________________________________
>> 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
>
>
> ######################################################################
> ###############
> This e-mail message has been scanned for Viruses and Content and
> cleared by MailMarshal
> ######################################################################
> ###############
> _______________________________________________
> 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