Re: put url tricks to copy files on windows

2017-06-23 Thread Bob Sneidar via use-livecode
Oooohhh...

Bob S


> On Jun 20, 2017, at 23:07 , Mark Waddingham via use-livecode 
>  wrote:
> 
> On an unrelated not you don't need to twiddle with the defaultfolder as 
> files() and folders() now take an optional argument for the path :)
> 
> Mark


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: put url tricks to copy files on windows

2017-06-21 Thread Mike Kerner via use-livecode
There is some caveat to revcopyfile that I ran into when I went the url
binfile way, but I forget what it is.  It might have been the directory
separators being platform-dependent, but it was months ago.

On Wed, Jun 21, 2017 at 10:34 AM, Roger Eller via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I knew that, but didn't want to sound like a know-it-all.  ;-p
>
> ~Roger
>
> On Wed, Jun 21, 2017 at 10:17 AM, Matthias Rebbe via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > I don´t want to sound like a know-it-all, but revcopyfile also uses just
> > the shell to copy the files:
> >
> >
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: put url tricks to copy files on windows

2017-06-21 Thread Roger Eller via use-livecode
I knew that, but didn't want to sound like a know-it-all.  ;-p

~Roger

On Wed, Jun 21, 2017 at 10:17 AM, Matthias Rebbe via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I don´t want to sound like a know-it-all, but revcopyfile also uses just
> the shell to copy the files:
>
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: put url tricks to copy files on windows

2017-06-21 Thread Matthias Rebbe via use-livecode
I don´t want to sound like a know-it-all, but revcopyfile also uses just the 
shell to copy the files:

replace "\" with "/" in pDestFile
replace "\" with "/" in pSrcFile
  
if there is a directory pDestFile then
set the itemDel to "/"
if char -1 of pDestFile is "/" then
delete char -1 of pDestFile
end if
   
local tDestFileName
put item -1 of pSrcFile into tDestFileName
set the itemDel to comma
put "/" & tDestFileName after pDestFile
end if
get shell ("copy" && revWindowsFromUnixPath(quote) && 
revWindowsFromUnixPath(quote))


Matthias

Matthias Rebbe
+49 5741 31
‌matthiasrebbe.eu ‌

> Am 21.06.2017 um 15:57 schrieb Roger Eller via use-livecode 
> >:
> 
> You could also try the revCopyFile and revCopyFolder commands.  I normally
> only use the URL syntax to save new data I've created in a variable to a
> file.  When copying existing files/folders I either use "get shell" to call
> native commands, or the built-in revCopyFile.
> 
> ~Roger
> 
> On Wed, Jun 21, 2017 at 9:40 AM, Mike Kerner via use-livecode <
> use-livecode@lists.runrev.com > wrote:
> 
>> Let me be clearer.  I think the message could be better (or perhaps the
>> dictionary could list the error messages and explain them), because even
>> though we use the "open" command in LC to read from a file or create a
>> file, the lack of the need for a "create file" command in LCS doesn't
>> remove that thing in my intuition that says "well, the only file that needs
>> to be opened is the one that exists, already, so the problem must be on
>> that side".
>> 
>> 
>> On Wed, Jun 21, 2017 at 8:39 AM, Matthias Rebbe via use-livecode <
>> use-livecode@lists.runrev.com > wrote:
>> 
>>> to write to a file, even if it is copied, it has to be opened first.
>>> 
>>> Did you try to remove the 2 slashes in the to path also?
>>> 
>>> 
>>> Matthias Rebbe
>>> +49 5741 31
>>> ‌matthiasrebbe.eu  >> >‌
>>> 
 Am 21.06.2017 um 14:31 schrieb Mike Kerner via use-livecode <
>>> use-livecode@lists.runrev.com  
>>> >> >>:
 
 also what is confusing is when I removed the // from the FROM file but
>>> left
 it in for the TO file, I get the same error, "can't open file", which
>> to
>>> me
 implies that the file that exists can't be read, not that the TO path
>> is
 wrong.
 
 On Wed, Jun 21, 2017 at 7:37 AM, Roger Eller via use-livecode <
 use-livecode@lists.runrev.com  
 >>
>>> wrote:
 
> Without meaning to add more confusion, a Windows UNC path from a
>> server
>>> to
> a file does work with the form
> "binfile://servername/folder/folder/filename.txt 
> 
>>> >> >", while local access
>> (or
> mapped drives) are like "binfile:C:/folder/folder/filename.txt".
> 
> ~Roger
> 
> On Jun 21, 2017 2:07 AM, "Mark Waddingham via use-livecode" <
> use-livecode@lists.runrev.com  
>  >>
>>> wrote:
> 
>> As others have pointed out, for binfile and file urls you shouldn't
>> include the standard '//' in front of the (absolute) path. These are
>>> not
>> parsed by the engine as standard urls - everything after the : is
>>> parsed
> as
>> the filename.
>> 
>> On an unrelated not you don't need to twiddle with the defaultfolder
>> as
>> files() and folders() now take an optional argument for the path :)
>> 
>> Mark
>> 
>> Sent from my iPhone
>> 
>>> On 21 Jun 2017, at 03:37, Mark Wieder via use-livecode <
>> use-livecode@lists.runrev.com  
>> > 
 
>>> wrote:
>>> 
 On 06/20/2017 07:19 PM, Mike Kerner via use-livecode wrote:
 I'm not on a mac a lot :-(
 So is "binfile:" more universal, or do I have to check the
>> platform,
 first?  What is the technique on linux?
>>> 
>>> As far as I can remember, the "//" has never been recommended or
>> approved for file or binfile. I'm surprised it gets parsed properly
>> for
>> OSX. You don't need or want it.
>>> 
>>> --
>>> Mark Wieder
>>> ahsoftw...@gmail.com  
>>> >
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com 

Re: put url tricks to copy files on windows

2017-06-21 Thread Roger Eller via use-livecode
You could also try the revCopyFile and revCopyFolder commands.  I normally
only use the URL syntax to save new data I've created in a variable to a
file.  When copying existing files/folders I either use "get shell" to call
native commands, or the built-in revCopyFile.

~Roger

On Wed, Jun 21, 2017 at 9:40 AM, Mike Kerner via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Let me be clearer.  I think the message could be better (or perhaps the
> dictionary could list the error messages and explain them), because even
> though we use the "open" command in LC to read from a file or create a
> file, the lack of the need for a "create file" command in LCS doesn't
> remove that thing in my intuition that says "well, the only file that needs
> to be opened is the one that exists, already, so the problem must be on
> that side".
>
>
> On Wed, Jun 21, 2017 at 8:39 AM, Matthias Rebbe via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > to write to a file, even if it is copied, it has to be opened first.
> >
> > Did you try to remove the 2 slashes in the to path also?
> >
> >
> > Matthias Rebbe
> > +49 5741 31
> > ‌matthiasrebbe.eu ‌
> >
> > > Am 21.06.2017 um 14:31 schrieb Mike Kerner via use-livecode <
> > use-livecode@lists.runrev.com >:
> > >
> > > also what is confusing is when I removed the // from the FROM file but
> > left
> > > it in for the TO file, I get the same error, "can't open file", which
> to
> > me
> > > implies that the file that exists can't be read, not that the TO path
> is
> > > wrong.
> > >
> > > On Wed, Jun 21, 2017 at 7:37 AM, Roger Eller via use-livecode <
> > > use-livecode@lists.runrev.com >
> > wrote:
> > >
> > >> Without meaning to add more confusion, a Windows UNC path from a
> server
> > to
> > >> a file does work with the form
> > >> "binfile://servername/folder/folder/filename.txt
> > ", while local access
> (or
> > >> mapped drives) are like "binfile:C:/folder/folder/filename.txt".
> > >>
> > >> ~Roger
> > >>
> > >> On Jun 21, 2017 2:07 AM, "Mark Waddingham via use-livecode" <
> > >> use-livecode@lists.runrev.com >
> > wrote:
> > >>
> > >>> As others have pointed out, for binfile and file urls you shouldn't
> > >>> include the standard '//' in front of the (absolute) path. These are
> > not
> > >>> parsed by the engine as standard urls - everything after the : is
> > parsed
> > >> as
> > >>> the filename.
> > >>>
> > >>> On an unrelated not you don't need to twiddle with the defaultfolder
> as
> > >>> files() and folders() now take an optional argument for the path :)
> > >>>
> > >>> Mark
> > >>>
> > >>> Sent from my iPhone
> > >>>
> >  On 21 Jun 2017, at 03:37, Mark Wieder via use-livecode <
> > >>> use-livecode@lists.runrev.com  >>
> > wrote:
> > 
> > > On 06/20/2017 07:19 PM, Mike Kerner via use-livecode wrote:
> > > I'm not on a mac a lot :-(
> > > So is "binfile:" more universal, or do I have to check the
> platform,
> > > first?  What is the technique on linux?
> > 
> >  As far as I can remember, the "//" has never been recommended or
> > >>> approved for file or binfile. I'm surprised it gets parsed properly
> for
> > >>> OSX. You don't need or want it.
> > 
> >  --
> >  Mark Wieder
> >  ahsoftw...@gmail.com 
> > 
> >  ___
> >  use-livecode mailing list
> >  use-livecode@lists.runrev.com
> >  Please visit this url to subscribe, unsubscribe and manage your
> > >>> subscription preferences:
> >  http://lists.runrev.com/mailman/listinfo/use-livecode <
> > http://lists.runrev.com/mailman/listinfo/use-livecode>
> > >>>
> > >>>
> > >>> ___
> > >>> use-livecode mailing list
> > >>> use-livecode@lists.runrev.com 
> > >>> Please visit this url to subscribe, unsubscribe and manage your
> > >>> subscription preferences:
> > >>> http://lists.runrev.com/mailman/listinfo/use-livecode
> > >>>
> > >> ___
> > >> use-livecode mailing list
> > >> use-livecode@lists.runrev.com 
> > >> Please visit this url to subscribe, unsubscribe and manage your
> > >> subscription preferences:
> > >> http://lists.runrev.com/mailman/listinfo/use-livecode
> > >>
> > >
> > >
> > >
> > > --
> > > On the first day, God created the heavens and the Earth
> > > On the second day, God created the oceans.
> > > On the third day, God put the animals on hold for a few hours,
> > >   and did a little diving.
> > > And God said, "This is good."
> > > ___
> > > use-livecode mailing list
> > > use-livecode@lists.runrev.com 
> > > Please 

Re: put url tricks to copy files on windows

2017-06-21 Thread Mike Kerner via use-livecode
Let me be clearer.  I think the message could be better (or perhaps the
dictionary could list the error messages and explain them), because even
though we use the "open" command in LC to read from a file or create a
file, the lack of the need for a "create file" command in LCS doesn't
remove that thing in my intuition that says "well, the only file that needs
to be opened is the one that exists, already, so the problem must be on
that side".


On Wed, Jun 21, 2017 at 8:39 AM, Matthias Rebbe via use-livecode <
use-livecode@lists.runrev.com> wrote:

> to write to a file, even if it is copied, it has to be opened first.
>
> Did you try to remove the 2 slashes in the to path also?
>
>
> Matthias Rebbe
> +49 5741 31
> ‌matthiasrebbe.eu ‌
>
> > Am 21.06.2017 um 14:31 schrieb Mike Kerner via use-livecode <
> use-livecode@lists.runrev.com >:
> >
> > also what is confusing is when I removed the // from the FROM file but
> left
> > it in for the TO file, I get the same error, "can't open file", which to
> me
> > implies that the file that exists can't be read, not that the TO path is
> > wrong.
> >
> > On Wed, Jun 21, 2017 at 7:37 AM, Roger Eller via use-livecode <
> > use-livecode@lists.runrev.com >
> wrote:
> >
> >> Without meaning to add more confusion, a Windows UNC path from a server
> to
> >> a file does work with the form
> >> "binfile://servername/folder/folder/filename.txt
> ", while local access (or
> >> mapped drives) are like "binfile:C:/folder/folder/filename.txt".
> >>
> >> ~Roger
> >>
> >> On Jun 21, 2017 2:07 AM, "Mark Waddingham via use-livecode" <
> >> use-livecode@lists.runrev.com >
> wrote:
> >>
> >>> As others have pointed out, for binfile and file urls you shouldn't
> >>> include the standard '//' in front of the (absolute) path. These are
> not
> >>> parsed by the engine as standard urls - everything after the : is
> parsed
> >> as
> >>> the filename.
> >>>
> >>> On an unrelated not you don't need to twiddle with the defaultfolder as
> >>> files() and folders() now take an optional argument for the path :)
> >>>
> >>> Mark
> >>>
> >>> Sent from my iPhone
> >>>
>  On 21 Jun 2017, at 03:37, Mark Wieder via use-livecode <
> >>> use-livecode@lists.runrev.com >
> wrote:
> 
> > On 06/20/2017 07:19 PM, Mike Kerner via use-livecode wrote:
> > I'm not on a mac a lot :-(
> > So is "binfile:" more universal, or do I have to check the platform,
> > first?  What is the technique on linux?
> 
>  As far as I can remember, the "//" has never been recommended or
> >>> approved for file or binfile. I'm surprised it gets parsed properly for
> >>> OSX. You don't need or want it.
> 
>  --
>  Mark Wieder
>  ahsoftw...@gmail.com 
> 
>  ___
>  use-livecode mailing list
>  use-livecode@lists.runrev.com
>  Please visit this url to subscribe, unsubscribe and manage your
> >>> subscription preferences:
>  http://lists.runrev.com/mailman/listinfo/use-livecode <
> http://lists.runrev.com/mailman/listinfo/use-livecode>
> >>>
> >>>
> >>> ___
> >>> use-livecode mailing list
> >>> use-livecode@lists.runrev.com 
> >>> Please visit this url to subscribe, unsubscribe and manage your
> >>> subscription preferences:
> >>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>
> >> ___
> >> use-livecode mailing list
> >> use-livecode@lists.runrev.com 
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >
> >
> >
> > --
> > On the first day, God created the heavens and the Earth
> > On the second day, God created the oceans.
> > On the third day, God put the animals on hold for a few hours,
> >   and did a little diving.
> > And God said, "This is good."
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com 
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is 

Re: put url tricks to copy files on windows

2017-06-21 Thread Matthias Rebbe via use-livecode
to write to a file, even if it is copied, it has to be opened first.

Did you try to remove the 2 slashes in the to path also?


Matthias Rebbe
+49 5741 31
‌matthiasrebbe.eu ‌

> Am 21.06.2017 um 14:31 schrieb Mike Kerner via use-livecode 
> >:
> 
> also what is confusing is when I removed the // from the FROM file but left
> it in for the TO file, I get the same error, "can't open file", which to me
> implies that the file that exists can't be read, not that the TO path is
> wrong.
> 
> On Wed, Jun 21, 2017 at 7:37 AM, Roger Eller via use-livecode <
> use-livecode@lists.runrev.com > wrote:
> 
>> Without meaning to add more confusion, a Windows UNC path from a server to
>> a file does work with the form
>> "binfile://servername/folder/folder/filename.txt 
>> ", while local access (or
>> mapped drives) are like "binfile:C:/folder/folder/filename.txt".
>> 
>> ~Roger
>> 
>> On Jun 21, 2017 2:07 AM, "Mark Waddingham via use-livecode" <
>> use-livecode@lists.runrev.com > wrote:
>> 
>>> As others have pointed out, for binfile and file urls you shouldn't
>>> include the standard '//' in front of the (absolute) path. These are not
>>> parsed by the engine as standard urls - everything after the : is parsed
>> as
>>> the filename.
>>> 
>>> On an unrelated not you don't need to twiddle with the defaultfolder as
>>> files() and folders() now take an optional argument for the path :)
>>> 
>>> Mark
>>> 
>>> Sent from my iPhone
>>> 
 On 21 Jun 2017, at 03:37, Mark Wieder via use-livecode <
>>> use-livecode@lists.runrev.com > wrote:
 
> On 06/20/2017 07:19 PM, Mike Kerner via use-livecode wrote:
> I'm not on a mac a lot :-(
> So is "binfile:" more universal, or do I have to check the platform,
> first?  What is the technique on linux?
 
 As far as I can remember, the "//" has never been recommended or
>>> approved for file or binfile. I'm surprised it gets parsed properly for
>>> OSX. You don't need or want it.
 
 --
 Mark Wieder
 ahsoftw...@gmail.com 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode 
 
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com 
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com 
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com 
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: put url tricks to copy files on windows

2017-06-21 Thread Mike Kerner via use-livecode
also what is confusing is when I removed the // from the FROM file but left
it in for the TO file, I get the same error, "can't open file", which to me
implies that the file that exists can't be read, not that the TO path is
wrong.

On Wed, Jun 21, 2017 at 7:37 AM, Roger Eller via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Without meaning to add more confusion, a Windows UNC path from a server to
> a file does work with the form
> "binfile://servername/folder/folder/filename.txt", while local access (or
> mapped drives) are like "binfile:C:/folder/folder/filename.txt".
>
> ~Roger
>
> On Jun 21, 2017 2:07 AM, "Mark Waddingham via use-livecode" <
> use-livecode@lists.runrev.com> wrote:
>
> > As others have pointed out, for binfile and file urls you shouldn't
> > include the standard '//' in front of the (absolute) path. These are not
> > parsed by the engine as standard urls - everything after the : is parsed
> as
> > the filename.
> >
> > On an unrelated not you don't need to twiddle with the defaultfolder as
> > files() and folders() now take an optional argument for the path :)
> >
> > Mark
> >
> > Sent from my iPhone
> >
> > > On 21 Jun 2017, at 03:37, Mark Wieder via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> > >
> > >> On 06/20/2017 07:19 PM, Mike Kerner via use-livecode wrote:
> > >> I'm not on a mac a lot :-(
> > >> So is "binfile:" more universal, or do I have to check the platform,
> > >> first?  What is the technique on linux?
> > >
> > > As far as I can remember, the "//" has never been recommended or
> > approved for file or binfile. I'm surprised it gets parsed properly for
> > OSX. You don't need or want it.
> > >
> > > --
> > > Mark Wieder
> > > ahsoftw...@gmail.com
> > >
> > > ___
> > > use-livecode mailing list
> > > use-livecode@lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: put url tricks to copy files on windows

2017-06-21 Thread Roger Eller via use-livecode
Without meaning to add more confusion, a Windows UNC path from a server to
a file does work with the form
"binfile://servername/folder/folder/filename.txt", while local access (or
mapped drives) are like "binfile:C:/folder/folder/filename.txt".

~Roger

On Jun 21, 2017 2:07 AM, "Mark Waddingham via use-livecode" <
use-livecode@lists.runrev.com> wrote:

> As others have pointed out, for binfile and file urls you shouldn't
> include the standard '//' in front of the (absolute) path. These are not
> parsed by the engine as standard urls - everything after the : is parsed as
> the filename.
>
> On an unrelated not you don't need to twiddle with the defaultfolder as
> files() and folders() now take an optional argument for the path :)
>
> Mark
>
> Sent from my iPhone
>
> > On 21 Jun 2017, at 03:37, Mark Wieder via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> >> On 06/20/2017 07:19 PM, Mike Kerner via use-livecode wrote:
> >> I'm not on a mac a lot :-(
> >> So is "binfile:" more universal, or do I have to check the platform,
> >> first?  What is the technique on linux?
> >
> > As far as I can remember, the "//" has never been recommended or
> approved for file or binfile. I'm surprised it gets parsed properly for
> OSX. You don't need or want it.
> >
> > --
> > Mark Wieder
> > ahsoftw...@gmail.com
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: put url tricks to copy files on windows

2017-06-21 Thread Mark Waddingham via use-livecode
As others have pointed out, for binfile and file urls you shouldn't include the 
standard '//' in front of the (absolute) path. These are not parsed by the 
engine as standard urls - everything after the : is parsed as the filename.

On an unrelated not you don't need to twiddle with the defaultfolder as files() 
and folders() now take an optional argument for the path :)

Mark

Sent from my iPhone

> On 21 Jun 2017, at 03:37, Mark Wieder via use-livecode 
>  wrote:
> 
>> On 06/20/2017 07:19 PM, Mike Kerner via use-livecode wrote:
>> I'm not on a mac a lot :-(
>> So is "binfile:" more universal, or do I have to check the platform,
>> first?  What is the technique on linux?
> 
> As far as I can remember, the "//" has never been recommended or approved for 
> file or binfile. I'm surprised it gets parsed properly for OSX. You don't 
> need or want it.
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: put url tricks to copy files on windows

2017-06-20 Thread Mark Wieder via use-livecode

On 06/20/2017 07:19 PM, Mike Kerner via use-livecode wrote:

I'm not on a mac a lot :-(
So is "binfile:" more universal, or do I have to check the platform,
first?  What is the technique on linux?


As far as I can remember, the "//" has never been recommended or 
approved for file or binfile. I'm surprised it gets parsed properly for 
OSX. You don't need or want it.


--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: put url tricks to copy files on windows

2017-06-20 Thread Mike Kerner via use-livecode
I'm not on a mac a lot :-(
So is "binfile:" more universal, or do I have to check the platform,
first?  What is the technique on linux?

On Tue, Jun 20, 2017 at 10:09 PM, Roger Eller via use-livecode <
use-livecode@lists.runrev.com> wrote:

> You're not on a Mac anymore.  ;-p
>
> I second the suggestion to lose the // if the platform is Windows.
>
> ~Roger
>
> On Jun 20, 2017 5:39 PM, "Mike Kerner via use-livecode" <
> use-livecode@lists.runrev.com> wrote:
>
> > In case it helps, here's the entire routine.  This works on a Mac.
> >
> > on copyFilesNFolders fromFolder toFolder
> >   if there is not a folder toFolder then
> > create folder toFolder
> > if the result is not empty then
> >   put the result into theResult
> >   errlog theResult
> >   quit
> > end if #the result is not empty
> >   end if #there is not a folder toFolder
> >
> >   put folders(fromFolder) into folderList
> >   #
> > repeat for each line folderName in folderList
> >   if char 1 of folderName is "." then next repeat
> >   copyFilesNFolders (fromFolder),
> > (toFolder)
> > end repeat #for each line folderName in folderList
> >   #
> >
> >   # > files in the folder>
> > put the defaultFolder into theDefaultFolder
> > set the defaultFolder to fromFolder
> > put the files into theFiles
> > repeat for each line theFile in theFiles
> >   if char 1 of theFile is "." then next repeat #skip all the
> invisible
> > files like .DS_STORE
> >   put fromFolder into fromFile
> >   put toFolder into toFile
> >   if there is not a file toFile then
> > put url ("binfile://" ) into url ("binfile://" )
> > if the result is not empty then
> >   put the result into theResult
> >   errlog theResult
> >   breakpoint
> >   quit
> > end if #the result is not empty
> >   end if #there is not a file toFile
> > end repeat #for each line theFile in theFiles
> > set the defaultFolder to theDefaultFolder
> >   # the
> > files in the folder>
> > end copyFilesNFolders
> >
> > On Tue, Jun 20, 2017 at 5:34 PM, Mike Kerner 
> > wrote:
> >
> > > I'm trying to use the put url technique to copy files on windows, but
> I'm
> > > getting "can't open file"
> > > If I do something like
> > > answer line 1 of url ("binfile://")
> > > I get what I expect, but when I try to
> > > put url ("binfile://") into url ("binfile://")
> > > I get "can't open file" in the result
> > >
> > > --
> > > On the first day, God created the heavens and the Earth
> > > On the second day, God created the oceans.
> > > On the third day, God put the animals on hold for a few hours,
> > >and did a little diving.
> > > And God said, "This is good."
> > >
> >
> >
> >
> > --
> > On the first day, God created the heavens and the Earth
> > On the second day, God created the oceans.
> > On the third day, God put the animals on hold for a few hours,
> >and did a little diving.
> > And God said, "This is good."
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: put url tricks to copy files on windows

2017-06-20 Thread Roger Eller via use-livecode
You're not on a Mac anymore.  ;-p

I second the suggestion to lose the // if the platform is Windows.

~Roger

On Jun 20, 2017 5:39 PM, "Mike Kerner via use-livecode" <
use-livecode@lists.runrev.com> wrote:

> In case it helps, here's the entire routine.  This works on a Mac.
>
> on copyFilesNFolders fromFolder toFolder
>   if there is not a folder toFolder then
> create folder toFolder
> if the result is not empty then
>   put the result into theResult
>   errlog theResult
>   quit
> end if #the result is not empty
>   end if #there is not a folder toFolder
>
>   put folders(fromFolder) into folderList
>   #
> repeat for each line folderName in folderList
>   if char 1 of folderName is "." then next repeat
>   copyFilesNFolders (fromFolder),
> (toFolder)
> end repeat #for each line folderName in folderList
>   #
>
>   # files in the folder>
> put the defaultFolder into theDefaultFolder
> set the defaultFolder to fromFolder
> put the files into theFiles
> repeat for each line theFile in theFiles
>   if char 1 of theFile is "." then next repeat #skip all the invisible
> files like .DS_STORE
>   put fromFolder into fromFile
>   put toFolder into toFile
>   if there is not a file toFile then
> put url ("binfile://" ) into url ("binfile://" )
> if the result is not empty then
>   put the result into theResult
>   errlog theResult
>   breakpoint
>   quit
> end if #the result is not empty
>   end if #there is not a file toFile
> end repeat #for each line theFile in theFiles
> set the defaultFolder to theDefaultFolder
>   # files in the folder>
> end copyFilesNFolders
>
> On Tue, Jun 20, 2017 at 5:34 PM, Mike Kerner 
> wrote:
>
> > I'm trying to use the put url technique to copy files on windows, but I'm
> > getting "can't open file"
> > If I do something like
> > answer line 1 of url ("binfile://")
> > I get what I expect, but when I try to
> > put url ("binfile://") into url ("binfile://")
> > I get "can't open file" in the result
> >
> > --
> > On the first day, God created the heavens and the Earth
> > On the second day, God created the oceans.
> > On the third day, God put the animals on hold for a few hours,
> >and did a little diving.
> > And God said, "This is good."
> >
>
>
>
> --
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>and did a little diving.
> And God said, "This is good."
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: put url tricks to copy files on windows

2017-06-20 Thread Mike Kerner via use-livecode
In case it helps, here's the entire routine.  This works on a Mac.

on copyFilesNFolders fromFolder toFolder
  if there is not a folder toFolder then
create folder toFolder
if the result is not empty then
  put the result into theResult
  errlog theResult
  quit
end if #the result is not empty
  end if #there is not a folder toFolder

  put folders(fromFolder) into folderList
  #
repeat for each line folderName in folderList
  if char 1 of folderName is "." then next repeat
  copyFilesNFolders (fromFolder),
(toFolder)
end repeat #for each line folderName in folderList
  #

  #
put the defaultFolder into theDefaultFolder
set the defaultFolder to fromFolder
put the files into theFiles
repeat for each line theFile in theFiles
  if char 1 of theFile is "." then next repeat #skip all the invisible
files like .DS_STORE
  put fromFolder into fromFile
  put toFolder into toFile
  if there is not a file toFile then
put url ("binfile://" ) into url ("binfile://" )
if the result is not empty then
  put the result into theResult
  errlog theResult
  breakpoint
  quit
end if #the result is not empty
  end if #there is not a file toFile
end repeat #for each line theFile in theFiles
set the defaultFolder to theDefaultFolder
  #
end copyFilesNFolders

On Tue, Jun 20, 2017 at 5:34 PM, Mike Kerner 
wrote:

> I'm trying to use the put url technique to copy files on windows, but I'm
> getting "can't open file"
> If I do something like
> answer line 1 of url ("binfile://")
> I get what I expect, but when I try to
> put url ("binfile://") into url ("binfile://")
> I get "can't open file" in the result
>
> --
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>and did a little diving.
> And God said, "This is good."
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: put url tricks to copy files on windows

2017-06-20 Thread Matthias Rebbe via use-livecode
Mike,

please remove the // from your code and it should work.
And of course make sure that you have write permission to the folder you are 
writing to.

Regards,
Matthias


Matthias Rebbe
+49 5741 31
‌matthiasrebbe.eu ‌

> Am 20.06.2017 um 23:34 schrieb Mike Kerner via use-livecode 
> >:
> 
> I'm trying to use the put url technique to copy files on windows, but I'm
> getting "can't open file"
> If I do something like
> answer line 1 of url ("binfile://")
> I get what I expect, but when I try to
> put url ("binfile://") into url ("binfile://")
> I get "can't open file" in the result
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com 
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode 
> 



Matthias Rebbe
+49 5741 31
‌matthiasrebbe.eu ‌

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

put url tricks to copy files on windows

2017-06-20 Thread Mike Kerner via use-livecode
I'm trying to use the put url technique to copy files on windows, but I'm
getting "can't open file"
If I do something like
answer line 1 of url ("binfile://")
I get what I expect, but when I try to
put url ("binfile://") into url ("binfile://")
I get "can't open file" in the result

-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode