Re: Ventura 1.3 - revcopyfile

2023-04-06 Thread Bob Sneidar via use-livecode
I just use createFolder. I discovered however that the folder you are creating 
the new folder in has to exist already. In other words, if the root folder is 
hdd/users/bob/documents I cannot simply create a folder 
hdd/users/bob/documents/filetransfer/data/forms. I have to create file 
transfer, then create data, then create forms. 

I typically do this by setting the itemDelimiter to "/" then looping through 
the items and checking to see if the folder exists next repeating if it does, 
appending the current item to the path, creating the folder, then rinse and 
repeat. 

Bob S


> On Apr 6, 2023, at 16:53, Chris Heidecker via use-livecode 
>  wrote:
> 
> Hi,
> 
> I had some trouble using revCopyFolder, maybe it is related.
> 
> Looking for a method to move/duplicate folders on MacOS I tried using 
> revCopyFolder.
> 
> The internal LC appleScript seems to use 'copy folder' in LC9.6.8
> On MacOS 12.6.3 that does not work for me.
> 'duplicate folder' does. 
> Not sure since when or what version this changed.
> Maybe it's the same for revCopyFile
> 
> Applescript from LiveCode works  pretty well for me, most of the time.
> Moving and duplicating folders in the Finder by applescript from LC is slow. 
> 
> Adding 'ignoring application responses' get's the beachball away, but also 
> all the results and errors.
> Maybe somebody has a different workaround?
> 
> My script for 'do ... as applescript' looks something like this:
> 
> set sourcePath to "/Users/.../"
> set destinationPath to "/Users/.../"
> tell application "Finder"
>   ignoring application responses
>   set theSource to sourcePath as POSIX file
>   set theDestination to destinationPath as POSIX file
>   duplicate folder theSource to folder theDestination
>   end ignoring
> end tell
> 
> The script works like expected, but getting the results and errors would be 
> helpfull.
> 
> regards,
> Chris Hiedecker
> 
>> Op 6 apr. 2023, om 13:28 heeft Paul Dupuis via use-livecode 
>>  het volgende geschreven:
>> 
>> You may also be able to address this by giving any Standalone if this app is 
>> it's own Standalone) or the Livecode version you are using the "Full Disk 
>> Access" permission, from System Settings
>> 
>> 
>> 
>> On 4/6/2023 1:03 AM, Jean-Jacques Wagner via use-livecode wrote:
>>> Hi,
>>> Last Sunday I upgrade to ventura 1.3 and since then I am in  big troubles. 
>>> The function revcopyfile does not work anymore.
>>> I have stack to manage files (over 8000 pdf files), which with  revcopyfile 
>>> are getting corrupt. There are not anymore openable
>>> using preview, but also pages dokument are getting lost or corrupt, because 
>>> not anymore reopenable.
>>> 
>>> Some time a file placed in a folder is not anymore openable, moving it on 
>>> the desktop, there is sometime against openable.
>>> 
>>> I pin down the problems on a script, where I do makes on regular basis a 
>>> backup of  about 10 textfiles (Wrangler) and 20 stacks,
>>> so using revcopyfile and rename file to do it. The backup is not longer 
>>> functioning, make no copies of the files anymore. Just one
>>> old stack, which I don not use for year is copied.
>>> 
>>> So I can spend just now the time to go more deeper and investigate on the 
>>> problem, since I have to be careful not to loose my
>>> documents which I will have to deliver within the next 5 days. But at first 
>>> I couldn’t at a time open document, then I was able to
>>> pin down thats was not the system but the function revcopyfile should be at 
>>> the center of the problems. Possibly it has to do with
>>> AppleScript (I hate this app, which was and is almost a copy of hypercard 
>>> in a very bad manner) on which revcopyfile should work.
>>> 
>>> This is an alert, I will be able to go deeper finding the trouble by end of 
>>> next week.
>>> 
>>> Have <https://dict.leo.org/englisch-deutsch/Have> a 
>>> <https://dict.leo.org/englisch-deutsch/a> nice 
>>> <https://dict.leo.org/englisch-deutsch/nice> Easter 
>>> <https://dict.leo.org/englisch-deutsch/Easter>!
>>> 
>>> Jean-Jacques Wagner
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit t

Re: Ventura 1.3 - revcopyfile

2023-04-06 Thread Chris Heidecker via use-livecode
Hi,

I had some trouble using revCopyFolder, maybe it is related.

Looking for a method to move/duplicate folders on MacOS I tried using 
revCopyFolder.

The internal LC appleScript seems to use 'copy folder' in LC9.6.8
On MacOS 12.6.3 that does not work for me.
'duplicate folder' does. 
Not sure since when or what version this changed.
Maybe it's the same for revCopyFile

Applescript from LiveCode works  pretty well for me, most of the time.
Moving and duplicating folders in the Finder by applescript from LC is slow. 

Adding 'ignoring application responses' get's the beachball away, but also all 
the results and errors.
Maybe somebody has a different workaround?

My script for 'do ... as applescript' looks something like this:

set sourcePath to "/Users/.../"
set destinationPath to "/Users/.../"
tell application "Finder"
ignoring application responses
set theSource to sourcePath as POSIX file
set theDestination to destinationPath as POSIX file
duplicate folder theSource to folder theDestination
end ignoring
end tell

The script works like expected, but getting the results and errors would be 
helpfull.

regards,
Chris Hiedecker

> Op 6 apr. 2023, om 13:28 heeft Paul Dupuis via use-livecode 
>  het volgende geschreven:
> 
> You may also be able to address this by giving any Standalone if this app is 
> it's own Standalone) or the Livecode version you are using the "Full Disk 
> Access" permission, from System Settings
> 
> 
> 
> On 4/6/2023 1:03 AM, Jean-Jacques Wagner via use-livecode wrote:
>> Hi,
>> Last Sunday I upgrade to ventura 1.3 and since then I am in  big troubles. 
>> The function revcopyfile does not work anymore.
>> I have stack to manage files (over 8000 pdf files), which with  revcopyfile 
>> are getting corrupt. There are not anymore openable
>> using preview, but also pages dokument are getting lost or corrupt, because 
>> not anymore reopenable.
>> 
>> Some time a file placed in a folder is not anymore openable, moving it on 
>> the desktop, there is sometime against openable.
>> 
>> I pin down the problems on a script, where I do makes on regular basis a 
>> backup of  about 10 textfiles (Wrangler) and 20 stacks,
>> so using revcopyfile and rename file to do it. The backup is not longer 
>> functioning, make no copies of the files anymore. Just one
>> old stack, which I don not use for year is copied.
>> 
>> So I can spend just now the time to go more deeper and investigate on the 
>> problem, since I have to be careful not to loose my
>> documents which I will have to deliver within the next 5 days. But at first 
>> I couldn’t at a time open document, then I was able to
>> pin down thats was not the system but the function revcopyfile should be at 
>> the center of the problems. Possibly it has to do with
>> AppleScript (I hate this app, which was and is almost a copy of hypercard in 
>> a very bad manner) on which revcopyfile should work.
>> 
>> This is an alert, I will be able to go deeper finding the trouble by end of 
>> next week.
>> 
>> Have <https://dict.leo.org/englisch-deutsch/Have> a 
>> <https://dict.leo.org/englisch-deutsch/a> nice 
>> <https://dict.leo.org/englisch-deutsch/nice> Easter 
>> <https://dict.leo.org/englisch-deutsch/Easter>!
>> 
>> Jean-Jacques Wagner
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> ___
>> 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: Ventura 1.3 - revcopyfile

2023-04-06 Thread Paul Dupuis via use-livecode
You may also be able to address this by giving any Standalone if this 
app is it's own Standalone) or the Livecode version you are using the 
"Full Disk Access" permission, from System Settings




On 4/6/2023 1:03 AM, Jean-Jacques Wagner via use-livecode wrote:

Hi,
Last Sunday I upgrade to ventura 1.3 and since then I am in  big troubles. The 
function revcopyfile does not work anymore.
I have stack to manage files (over 8000 pdf files), which with  revcopyfile are 
getting corrupt. There are not anymore openable
using preview, but also pages dokument are getting lost or corrupt, because not 
anymore reopenable.

Some time a file placed in a folder is not anymore openable, moving it on the 
desktop, there is sometime against openable.

I pin down the problems on a script, where I do makes on regular basis a backup 
of  about 10 textfiles (Wrangler) and 20 stacks,
so using revcopyfile and rename file to do it. The backup is not longer 
functioning, make no copies of the files anymore. Just one
old stack, which I don not use for year is copied.

So I can spend just now the time to go more deeper and investigate on the 
problem, since I have to be careful not to loose my
documents which I will have to deliver within the next 5 days. But at first I 
couldn’t at a time open document, then I was able to
pin down thats was not the system but the function revcopyfile should be at the 
center of the problems. Possibly it has to do with
AppleScript (I hate this app, which was and is almost a copy of hypercard in a 
very bad manner) on which revcopyfile should work.

This is an alert, I will be able to go deeper finding the trouble by end of 
next week.

Have <https://dict.leo.org/englisch-deutsch/Have> a 
<https://dict.leo.org/englisch-deutsch/a> nice <https://dict.leo.org/englisch-deutsch/nice> 
Easter <https://dict.leo.org/englisch-deutsch/Easter>!

Jean-Jacques Wagner








___
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: Ventura 1.3 - revcopyfile

2023-04-06 Thread panagiotis m via use-livecode
Hello Jean-Jacques,

This sounds like a permissions issue. Which version of LiveCode are you
using? IIRC, I think we fixed a similar issue in LC 9.6.8 - we added proper
permissions to the LC IDE and standalones to use AppleScript to control
other apps in recent MacOS versions.

If you still see the problem in LC 9.6.8+, I suggest you file a bug report (
https://quality.livecode.com) and include a simple sample stack which we
can use to reproduce the problem.

Kind regards,
Panos


On Thu, 6 Apr 2023 at 08:05, Jean-Jacques Wagner via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi,
> Last Sunday I upgrade to ventura 1.3 and since then I am in  big troubles.
> The function revcopyfile does not work anymore.
> I have stack to manage files (over 8000 pdf files), which with
> revcopyfile are getting corrupt. There are not anymore openable
> using preview, but also pages dokument are getting lost or corrupt,
> because not anymore reopenable.
>
> Some time a file placed in a folder is not anymore openable, moving it on
> the desktop, there is sometime against openable.
>
> I pin down the problems on a script, where I do makes on regular basis a
> backup of  about 10 textfiles (Wrangler) and 20 stacks,
> so using revcopyfile and rename file to do it. The backup is not longer
> functioning, make no copies of the files anymore. Just one
> old stack, which I don not use for year is copied.
>
> So I can spend just now the time to go more deeper and investigate on the
> problem, since I have to be careful not to loose my
> documents which I will have to deliver within the next 5 days. But at
> first I couldn’t at a time open document, then I was able to
> pin down thats was not the system but the function revcopyfile should be
> at the center of the problems. Possibly it has to do with
> AppleScript (I hate this app, which was and is almost a copy of hypercard
> in a very bad manner) on which revcopyfile should work.
>
> This is an alert, I will be able to go deeper finding the trouble by end
> of next week.
>
> Have <https://dict.leo.org/englisch-deutsch/Have> a <
> https://dict.leo.org/englisch-deutsch/a> nice <
> https://dict.leo.org/englisch-deutsch/nice> Easter <
> https://dict.leo.org/englisch-deutsch/Easter>!
>
> Jean-Jacques Wagner
>
>
>
>
>
>
>
>
> ___
> 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


Ventura 1.3 - revcopyfile

2023-04-05 Thread Jean-Jacques Wagner via use-livecode
Hi,
Last Sunday I upgrade to ventura 1.3 and since then I am in  big troubles. The 
function revcopyfile does not work anymore.
I have stack to manage files (over 8000 pdf files), which with  revcopyfile are 
getting corrupt. There are not anymore openable
using preview, but also pages dokument are getting lost or corrupt, because not 
anymore reopenable.

Some time a file placed in a folder is not anymore openable, moving it on the 
desktop, there is sometime against openable.

I pin down the problems on a script, where I do makes on regular basis a backup 
of  about 10 textfiles (Wrangler) and 20 stacks, 
so using revcopyfile and rename file to do it. The backup is not longer 
functioning, make no copies of the files anymore. Just one
old stack, which I don not use for year is copied.

So I can spend just now the time to go more deeper and investigate on the 
problem, since I have to be careful not to loose my 
documents which I will have to deliver within the next 5 days. But at first I 
couldn’t at a time open document, then I was able to
pin down thats was not the system but the function revcopyfile should be at the 
center of the problems. Possibly it has to do with
AppleScript (I hate this app, which was and is almost a copy of hypercard in a 
very bad manner) on which revcopyfile should work.

This is an alert, I will be able to go deeper finding the trouble by end of 
next week. 

Have <https://dict.leo.org/englisch-deutsch/Have> a 
<https://dict.leo.org/englisch-deutsch/a> nice 
<https://dict.leo.org/englisch-deutsch/nice> Easter 
<https://dict.leo.org/englisch-deutsch/Easter>!

Jean-Jacques Wagner








___
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


[BUG] revCopyFile

2015-04-07 Thread Kay C Lan
When using revCopyFile on OS X I keep getting the result: execution error

The good news is that there is NO error, the file is copying just nicely
and arrives intact. The bad news is obviously I can't programmatically
check that the Copy was successful.

The cause seems to be the length of the copy; I'm copying files that
normally indicate they'll take 6 - 30+ min. In my script I check the result
and pop up a Warning if there is an error, about 2 min into the Copy
process my Warning pops up. But the Finder Copy window still shows the copy
progressing nicely.

I've tested this on using both External HDs and Network HDs on:
PPC OS X 10.5.8 LC 6.6.3
Intel OS X 10.9.5 LC 7.0.4 rc3

Again, I can't believe I'm the first person to copy a large file with LC,
but before I go ahead and report this (along with the revDeleteFolder bug)
I was just wondering if anyone was aware of some feature to extend the time
before LC reported the Copy as failing.

Might have to look at a shell command as a workaround.
___
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


revcopyfile needs admin password on OSX?

2013-06-28 Thread Mark Mitchell
Trying to move and sort large numbers of files around.  Revcopyfile has always 
worked before but now with OS 10.8.4 it wants my admin password for each file 
in the repeat loop.  I've tried making sure that all the folders involved have 
permissions set to read and write for everyone, but to no avail.  

It does copy the files just fine, but needs an admin password for each file, 
which is simply impossible for hundreds of files. 

Much obliged for any help.  

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: revCopyFile questions

2012-06-02 Thread Peter Haworth
Well, can't figure out what's going on.  I even got less than helpful
errors (Input/Output error) when trying to do this in Terminal using cp.
 But I can drag/drop with no problem.

I've taken the chicked way out and switched to creating a .pkg installer
file instead using the productbuild command.  I have to make the switch
anyway at some point since the Mac App Store distributes apps with .pkg
installers.

Pete
lcSQL Software http://www.lcsql.com



On Fri, Jun 1, 2012 at 7:09 PM, J. Landman Gay jac...@hyperactivesw.comwrote:

 Permissions on the disk image, maybe? It seems like it should work and
 there's something else wrong. Once mounted, the OS treats an image just
 like any other disk, and all LiveCode does is tell OS to do a copy.


 On 6/1/12 6:10 PM, Peter Haworth wrote:

 Thanks Jacque.  I treid the formats you recommended and I'm still getting
 execution error back from revCopyFile with nothing else in the result.
  The disk image is mounted.

 I checked for the presence of the disk image using the message box as you
 suggested using the message box and got true..

 I also checked the application file availability using the message box and
 got true.  Interestingly, you have to use there is a folder not there
 is
 a file to check for the existence of the .app file/folder, even though
 you
 use revcopyfile to copy it.  The path to the appfile was copied and pasted
 directly from the error message I display so I'm certain I'm using the
 correct path.  I even used the message box to issue a revcopyfile of the
 app file to my desktop and that worked

 I'm beginning to wonder if revCopyFile is capable of handling disk images.

 This is all part of my post build processing to get ready for a release,
 so
 I could just copy the app file manually but would be nice to get it
 working
 by script.

 Pete
 lcSQL Softwarehttp://www.lcsql.com




 On Fri, Jun 1, 2012 at 10:47 AM, J. Landman Gayjac...@hyperactivesw.com
 **wrote:

  On 6/1/12 11:30 AM, Peter Haworth wrote:

  I'm trying to use revcopyfile to copy an application from a folder on my
 disk drive to a mounted disk image (OS X).  Keep getting Execution
 error
 from revCopyFile which really isn't very helpful.

 When copying an application file, should the file name be myApp or
 myApp.app?  Or should I be using revCopyFolder?


 Use revCopyFile and include the .app at the end. Provide the full path,
 the one you'd get back after an answer file dialog.



  What is the correct path to the mounted disk image?  I'm using
 /Volumes/myImage.sparseimage, also tried
 specialFolderpath(Home)

 /Volumes/myImage.sparseimage ( which I'm pretty sure isn't right).


 It should start with /Volumes/. To see if you have the path right try
 this in the message box: there is a folder /Volumes/myImage. I assume
 the
 disk image is mounted already, right? If so, I don't think the
 .sparseimage should be in the path because a mounted volume doesn't use
 that.



  Lack of a clear error message from revCopyFile is making it hard to
 figure
 out exactly what I'm doing wrong.


 Is the vague error the only thing you get in the result? As far as I
 know,
 checking the result is the only way to get any info. If any of the paths
 are wrong you should get an error about not being able to open the file,
 or
 no such folder (or something similar; can't recall offhand exactly what
 it
 says.)

 --
 Jacqueline Landman Gay | jac...@hyperactivesw.com
 HyperActive Software   | http://www.hyperactivesw.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-livecodehttp://lists.runrev.com/**mailman/listinfo/use-livecode
 **http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode



 --
 Jacqueline Landman Gay | jac...@hyperactivesw.com
 HyperActive Software   | http://www.hyperactivesw.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-livecodehttp://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


revCopyFile questions

2012-06-01 Thread Peter Haworth
I'm trying to use revcopyfile to copy an application from a folder on my
disk drive to a mounted disk image (OS X).  Keep getting Execution error
from revCopyFile which really isn't very helpful.

When copying an application file, should the file name be myApp or
myApp.app?  Or should I be using revCopyFolder?

What is the correct path to the mounted disk image?  I'm using
/Volumes/myImage.sparseimage, also tried specialFolderpath(Home) 
/Volumes/myImage.sparseimage ( which I'm pretty sure isn't right).

Lack of a clear error message from revCopyFile is making it hard to figure
out exactly what I'm doing wrong.


Pete
lcSQL Software http://www.lcsql.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: revCopyFile questions

2012-06-01 Thread J. Landman Gay

On 6/1/12 11:30 AM, Peter Haworth wrote:

I'm trying to use revcopyfile to copy an application from a folder on my
disk drive to a mounted disk image (OS X).  Keep getting Execution error
from revCopyFile which really isn't very helpful.

When copying an application file, should the file name be myApp or
myApp.app?  Or should I be using revCopyFolder?


Use revCopyFile and include the .app at the end. Provide the full 
path, the one you'd get back after an answer file dialog.




What is the correct path to the mounted disk image?  I'm using
/Volumes/myImage.sparseimage, also tried specialFolderpath(Home)
/Volumes/myImage.sparseimage ( which I'm pretty sure isn't right).


It should start with /Volumes/. To see if you have the path right try 
this in the message box: there is a folder /Volumes/myImage. I assume 
the disk image is mounted already, right? If so, I don't think the 
.sparseimage should be in the path because a mounted volume doesn't 
use that.




Lack of a clear error message from revCopyFile is making it hard to figure
out exactly what I'm doing wrong.


Is the vague error the only thing you get in the result? As far as I 
know, checking the result is the only way to get any info. If any of the 
paths are wrong you should get an error about not being able to open the 
file, or no such folder (or something similar; can't recall offhand 
exactly what it says.)


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: revCopyFile questions

2012-06-01 Thread Peter Haworth
Thanks Jacque.  I treid the formats you recommended and I'm still getting
execution error back from revCopyFile with nothing else in the result.
 The disk image is mounted.

I checked for the presence of the disk image using the message box as you
suggested using the message box and got true..

I also checked the application file availability using the message box and
got true.  Interestingly, you have to use there is a folder not there is
a file to check for the existence of the .app file/folder, even though you
use revcopyfile to copy it.  The path to the appfile was copied and pasted
directly from the error message I display so I'm certain I'm using the
correct path.  I even used the message box to issue a revcopyfile of the
app file to my desktop and that worked

I'm beginning to wonder if revCopyFile is capable of handling disk images.

This is all part of my post build processing to get ready for a release, so
I could just copy the app file manually but would be nice to get it working
by script.

Pete
lcSQL Software http://www.lcsql.com



On Fri, Jun 1, 2012 at 10:47 AM, J. Landman Gay jac...@hyperactivesw.comwrote:

 On 6/1/12 11:30 AM, Peter Haworth wrote:

 I'm trying to use revcopyfile to copy an application from a folder on my
 disk drive to a mounted disk image (OS X).  Keep getting Execution error
 from revCopyFile which really isn't very helpful.

 When copying an application file, should the file name be myApp or
 myApp.app?  Or should I be using revCopyFolder?


 Use revCopyFile and include the .app at the end. Provide the full path,
 the one you'd get back after an answer file dialog.



 What is the correct path to the mounted disk image?  I'm using
 /Volumes/myImage.sparseimage**, also tried specialFolderpath(Home)
 /Volumes/myImage.sparseimage ( which I'm pretty sure isn't right).


 It should start with /Volumes/. To see if you have the path right try
 this in the message box: there is a folder /Volumes/myImage. I assume the
 disk image is mounted already, right? If so, I don't think the
 .sparseimage should be in the path because a mounted volume doesn't use
 that.



 Lack of a clear error message from revCopyFile is making it hard to figure
 out exactly what I'm doing wrong.


 Is the vague error the only thing you get in the result? As far as I know,
 checking the result is the only way to get any info. If any of the paths
 are wrong you should get an error about not being able to open the file, or
 no such folder (or something similar; can't recall offhand exactly what it
 says.)

 --
 Jacqueline Landman Gay | jac...@hyperactivesw.com
 HyperActive Software   | http://www.hyperactivesw.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-livecodehttp://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


revCopyFile

2012-05-31 Thread Peter Haworth
Is there any way to get a meaningful error message from revCopyFile other
than the ubiquitous execution error (on OS X)?
Pete
lcSQL Software http://www.lcsql.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: revCopyFile

2012-03-23 Thread Geoff Canyon
I posted it earlier. Here it is again.

*on* shellCopyFile tSource,tTarget -- tSource and tTarget are both full
paths

   *get* shell(cp  quote  tSource  quote  quote  tTarget  quote)

   *if* it is not empty *then*

  *-- handle errors here*

   *end* *if*

*end* shellCopyFile

On Thu, Mar 22, 2012 at 10:35 AM, Bob Sneidar b...@twft.com wrote:

 Could you share the shell script that does the copy? That would be useful
 to many I think.

___
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: revCopyFile

2012-03-23 Thread Geoff Canyon
No clue how it would work on Windows. Here it is again:

*on* shellCopyFile tSource,tTarget -- full paths

   *get* shell(cp  quote  tSource  quote  quote  tTarget  quote)

   *if* it is not empty *then*

  *-- handle errors here*

   *end* *if*

*end* shellCopyFile

On Thu, Mar 22, 2012 at 11:46 AM, Pete p...@mollysrevenge.com wrote:

 Also, I assume the shell commands would be different on Windows and Mac.
  That's an inconvenience because it means extra coding, but not a show
 stopper.

___
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: revCopyFile

2012-03-23 Thread Geoff Canyon
It is stunning to me that this is faster than using a shell command. I did
the same test as before (about thirty files, about 70k each) and copying
them by using binary reads/writes took about one-third the time of using
the shell command. I thought it might be overhead with calling shell, but I
ran it on a single 50MB file, and the binary read/write method was better
than twice as fast there as well. What *possible* overhead could there be
in a shell command that would make it better than twice as slow as
reading/writing the file 16kb at a time?

On Thu, Mar 22, 2012 at 6:11 PM, Maarten Koopmans 
maarten.koopm...@gmail.com wrote:

 I scripted this using the read as binary etc. using 16KB buffers some time
 ago in pure LC. Much faster, and cross-platform.  Idon'thave the code here
 at hand, but it is really straightforward:

 Open the source file for read binary
 Open the destination file for write binary
 Read 16KB or whatever is left if it's less from the source into a buffer
 Append the buffer to the destination
 Loop until done
 Close the files

 Faster then revCopyFile (in fact, why doesn't itdo it this way) and no
 hassle with shells or external processes where you need to check if they
 actually did what you asked.

 HTH, Maarten

 On Thursday, March 22, 2012, Pete p...@mollysrevenge.com wrote:
  Hi Geoff,
  Thanks for the speed test info.  I'm not very familiar with shell
 commands
  so maybe you could let me know the command to use? What I need to do is
  copy a file to a different folder with a different file name.
 
  The lack of a progress bar might be a problem, but if the speed
 differences
  are as much as you found, there may not be a need for a progress bar at
 all.
 
  Also, I assume the shell commands would be different on Windows and Mac.
   That's an inconvenience because it means extra coding, but not a show
  stopper.
 
  Thanks,
  Pete
 
  On Wed, Mar 21, 2012 at 11:25 PM, Geoff Canyon gcan...@gmail.com
 wrote:
 
  The advantages derive from the fact that LiveCode isn't doing the actual
  copying with revCopyFile -- the Finder is. For completeness, the same
  advantage applies to using a shell command. You don't get a progress
 dialog
  though.
 
  Okay, I just did a quick one-off test with interface sounds off. For
 thirty
  files that were each about 70kb, using a shell command was about 3x
 faster
  than using revCopyFile. That's without taking advantage of the ability
 to
  move and rename in one step with a shell command. If that's what you're
  doing, the advantage would be even greater.
 
  On Wed, Mar 21, 2012 at 3:04 PM, Pete p...@mollysrevenge.com wrote:
 
   Thanks all for the input.  Sounds like Stephen's approach is the only
 way
   to get rid of it.  Seems like that setting will apply to other sounds
 as
   well, but I'm OK with that.
  
   As far as using AppleScript, I'm using revCopyFile because the
 dictionary
   claims there are certain advantages to using it over put URL or
 any
   other method, amongst which is that it does not require reading the
 file
   into memory, and since some of these files could be pretty large,
 that's
   significant.  On a Mac, it also displays a progress bar which I don;t
  think
   would be possible if I used put URL.
  
   Pete
  
   On Wed, Mar 21, 2012 at 11:35 AM, Geoff Canyon gcan...@gmail.com
  wrote:
  
I went straight to the shell command, so I don't know for sure, but
  this
sounds reasonable. There's also the overhead of spinning up
 AppleScript
   in
the first place. If Apple is doing that badly, that might also cause
problems I suppose.
   
On Wed, Mar 21, 2012 at 1:24 PM, stephen barncard 
stephenrevoluti...@barncard.com wrote:
   
 That was probably a big reason why multiple file transfers would
 take
more
 time - loading and unloading the sound - and perhaps the reason
 why
  it
 failed after memory was exceeded.

___
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
   
   
  
  
   --
   Pete
   Molly's Revenge http://www.mollysrevenge.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
 
 
 
 
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.com
  ___
  use-liv
 ___
 use-livecode mailing

Re: revCopyFile

2012-03-23 Thread Bob Sneidar
Write verification? Maybe LC's low level file functions do not verify, whereas 
the shell command does. 

Bob


On Mar 23, 2012, at 3:24 PM, Geoff Canyon wrote:

 It is stunning to me that this is faster than using a shell command. I did
 the same test as before (about thirty files, about 70k each) and copying
 them by using binary reads/writes took about one-third the time of using
 the shell command. I thought it might be overhead with calling shell, but I
 ran it on a single 50MB file, and the binary read/write method was better
 than twice as fast there as well. What *possible* overhead could there be
 in a shell command that would make it better than twice as slow as
 reading/writing the file 16kb at a time?


___
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: revCopyFile

2012-03-22 Thread Geoff Canyon
The advantages derive from the fact that LiveCode isn't doing the actual
copying with revCopyFile -- the Finder is. For completeness, the same
advantage applies to using a shell command. You don't get a progress dialog
though.

Okay, I just did a quick one-off test with interface sounds off. For thirty
files that were each about 70kb, using a shell command was about 3x faster
than using revCopyFile. That's without taking advantage of the ability to
move and rename in one step with a shell command. If that's what you're
doing, the advantage would be even greater.

On Wed, Mar 21, 2012 at 3:04 PM, Pete p...@mollysrevenge.com wrote:

 Thanks all for the input.  Sounds like Stephen's approach is the only way
 to get rid of it.  Seems like that setting will apply to other sounds as
 well, but I'm OK with that.

 As far as using AppleScript, I'm using revCopyFile because the dictionary
 claims there are certain advantages to using it over put URL or any
 other method, amongst which is that it does not require reading the file
 into memory, and since some of these files could be pretty large, that's
 significant.  On a Mac, it also displays a progress bar which I don;t think
 would be possible if I used put URL.

 Pete

 On Wed, Mar 21, 2012 at 11:35 AM, Geoff Canyon gcan...@gmail.com wrote:

  I went straight to the shell command, so I don't know for sure, but this
  sounds reasonable. There's also the overhead of spinning up AppleScript
 in
  the first place. If Apple is doing that badly, that might also cause
  problems I suppose.
 
  On Wed, Mar 21, 2012 at 1:24 PM, stephen barncard 
  stephenrevoluti...@barncard.com wrote:
 
   That was probably a big reason why multiple file transfers would take
  more
   time - loading and unloading the sound - and perhaps the reason why it
   failed after memory was exceeded.
  
  ___
  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
 
 


 --
 Pete
 Molly's Revenge http://www.mollysrevenge.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: revCopyFile

2012-03-22 Thread Bob Sneidar
Could you share the shell script that does the copy? That would be useful to 
many I think. 

Bob


On Mar 21, 2012, at 11:25 PM, Geoff Canyon wrote:

 The advantages derive from the fact that LiveCode isn't doing the actual
 copying with revCopyFile -- the Finder is. For completeness, the same
 advantage applies to using a shell command. You don't get a progress dialog
 though.
 
 Okay, I just did a quick one-off test with interface sounds off. For thirty
 files that were each about 70kb, using a shell command was about 3x faster
 than using revCopyFile. That's without taking advantage of the ability to
 move and rename in one step with a shell command. If that's what you're
 doing, the advantage would be even greater.
 
 On Wed, Mar 21, 2012 at 3:04 PM, Pete p...@mollysrevenge.com wrote:
 
 Thanks all for the input.  Sounds like Stephen's approach is the only way
 to get rid of it.  Seems like that setting will apply to other sounds as
 well, but I'm OK with that.
 
 As far as using AppleScript, I'm using revCopyFile because the dictionary
 claims there are certain advantages to using it over put URL or any
 other method, amongst which is that it does not require reading the file
 into memory, and since some of these files could be pretty large, that's
 significant.  On a Mac, it also displays a progress bar which I don;t think
 would be possible if I used put URL.
 
 Pete
 
 On Wed, Mar 21, 2012 at 11:35 AM, Geoff Canyon gcan...@gmail.com wrote:
 
 I went straight to the shell command, so I don't know for sure, but this
 sounds reasonable. There's also the overhead of spinning up AppleScript
 in
 the first place. If Apple is doing that badly, that might also cause
 problems I suppose.
 
 On Wed, Mar 21, 2012 at 1:24 PM, stephen barncard 
 stephenrevoluti...@barncard.com wrote:
 
 That was probably a big reason why multiple file transfers would take
 more
 time - loading and unloading the sound - and perhaps the reason why it
 failed after memory was exceeded.
 
 ___
 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
 
 
 
 
 --
 Pete
 Molly's Revenge http://www.mollysrevenge.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: revCopyFile

2012-03-22 Thread Pete
Hi Geoff,
Thanks for the speed test info.  I'm not very familiar with shell commands
so maybe you could let me know the command to use? What I need to do is
copy a file to a different folder with a different file name.

The lack of a progress bar might be a problem, but if the speed differences
are as much as you found, there may not be a need for a progress bar at all.

Also, I assume the shell commands would be different on Windows and Mac.
 That's an inconvenience because it means extra coding, but not a show
stopper.

Thanks,
Pete

On Wed, Mar 21, 2012 at 11:25 PM, Geoff Canyon gcan...@gmail.com wrote:

 The advantages derive from the fact that LiveCode isn't doing the actual
 copying with revCopyFile -- the Finder is. For completeness, the same
 advantage applies to using a shell command. You don't get a progress dialog
 though.

 Okay, I just did a quick one-off test with interface sounds off. For thirty
 files that were each about 70kb, using a shell command was about 3x faster
 than using revCopyFile. That's without taking advantage of the ability to
 move and rename in one step with a shell command. If that's what you're
 doing, the advantage would be even greater.

 On Wed, Mar 21, 2012 at 3:04 PM, Pete p...@mollysrevenge.com wrote:

  Thanks all for the input.  Sounds like Stephen's approach is the only way
  to get rid of it.  Seems like that setting will apply to other sounds as
  well, but I'm OK with that.
 
  As far as using AppleScript, I'm using revCopyFile because the dictionary
  claims there are certain advantages to using it over put URL or any
  other method, amongst which is that it does not require reading the file
  into memory, and since some of these files could be pretty large, that's
  significant.  On a Mac, it also displays a progress bar which I don;t
 think
  would be possible if I used put URL.
 
  Pete
 
  On Wed, Mar 21, 2012 at 11:35 AM, Geoff Canyon gcan...@gmail.com
 wrote:
 
   I went straight to the shell command, so I don't know for sure, but
 this
   sounds reasonable. There's also the overhead of spinning up AppleScript
  in
   the first place. If Apple is doing that badly, that might also cause
   problems I suppose.
  
   On Wed, Mar 21, 2012 at 1:24 PM, stephen barncard 
   stephenrevoluti...@barncard.com wrote:
  
That was probably a big reason why multiple file transfers would take
   more
time - loading and unloading the sound - and perhaps the reason why
 it
failed after memory was exceeded.
   
   ___
   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
  
  
 
 
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: revCopyFile

2012-03-22 Thread Maarten Koopmans
I scripted this using the read as binary etc. using 16KB buffers some time
ago in pure LC. Much faster, and cross-platform.  Idon'thave the code here
at hand, but it is really straightforward:

Open the source file for read binary
Open the destination file for write binary
Read 16KB or whatever is left if it's less from the source into a buffer
Append the buffer to the destination
Loop until done
Close the files

Faster then revCopyFile (in fact, why doesn't itdo it this way) and no
hassle with shells or external processes where you need to check if they
actually did what you asked.

HTH, Maarten

On Thursday, March 22, 2012, Pete p...@mollysrevenge.com wrote:
 Hi Geoff,
 Thanks for the speed test info.  I'm not very familiar with shell commands
 so maybe you could let me know the command to use? What I need to do is
 copy a file to a different folder with a different file name.

 The lack of a progress bar might be a problem, but if the speed
differences
 are as much as you found, there may not be a need for a progress bar at
all.

 Also, I assume the shell commands would be different on Windows and Mac.
  That's an inconvenience because it means extra coding, but not a show
 stopper.

 Thanks,
 Pete

 On Wed, Mar 21, 2012 at 11:25 PM, Geoff Canyon gcan...@gmail.com wrote:

 The advantages derive from the fact that LiveCode isn't doing the actual
 copying with revCopyFile -- the Finder is. For completeness, the same
 advantage applies to using a shell command. You don't get a progress
dialog
 though.

 Okay, I just did a quick one-off test with interface sounds off. For
thirty
 files that were each about 70kb, using a shell command was about 3x
faster
 than using revCopyFile. That's without taking advantage of the ability to
 move and rename in one step with a shell command. If that's what you're
 doing, the advantage would be even greater.

 On Wed, Mar 21, 2012 at 3:04 PM, Pete p...@mollysrevenge.com wrote:

  Thanks all for the input.  Sounds like Stephen's approach is the only
way
  to get rid of it.  Seems like that setting will apply to other sounds
as
  well, but I'm OK with that.
 
  As far as using AppleScript, I'm using revCopyFile because the
dictionary
  claims there are certain advantages to using it over put URL or any
  other method, amongst which is that it does not require reading the
file
  into memory, and since some of these files could be pretty large,
that's
  significant.  On a Mac, it also displays a progress bar which I don;t
 think
  would be possible if I used put URL.
 
  Pete
 
  On Wed, Mar 21, 2012 at 11:35 AM, Geoff Canyon gcan...@gmail.com
 wrote:
 
   I went straight to the shell command, so I don't know for sure, but
 this
   sounds reasonable. There's also the overhead of spinning up
AppleScript
  in
   the first place. If Apple is doing that badly, that might also cause
   problems I suppose.
  
   On Wed, Mar 21, 2012 at 1:24 PM, stephen barncard 
   stephenrevoluti...@barncard.com wrote:
  
That was probably a big reason why multiple file transfers would
take
   more
time - loading and unloading the sound - and perhaps the reason why
 it
failed after memory was exceeded.
   
   ___
   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
  
  
 
 
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.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




 --
 Pete
 Molly's Revenge http://www.mollysrevenge.com
 ___
 use-liv
___
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: revCopyFile

2012-03-22 Thread Bob Sneidar
Ohhh... good idea. And a perfect case for try/catch too! ;-)

Bob


On Mar 22, 2012, at 4:11 PM, Maarten Koopmans wrote:

 I scripted this using the read as binary etc. using 16KB buffers some time
 ago in pure LC. Much faster, and cross-platform.  Idon'thave the code here
 at hand, but it is really straightforward:
 
 Open the source file for read binary
 Open the destination file for write binary
 Read 16KB or whatever is left if it's less from the source into a buffer
 Append the buffer to the destination
 Loop until done
 Close the files
 
 Faster then revCopyFile (in fact, why doesn't itdo it this way) and no
 hassle with shells or external processes where you need to check if they
 actually did what you asked.
 
 HTH, Maarten


___
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: revCopyFile

2012-03-22 Thread Pete
Hi Maarten,
That's a nice solution.  Fast and doing it in chunks allows me to show a
progress bar.  I think I'll settle on that method.  Is there a way to get
the size of a file in LC?  With that, I could decide if it's even worth
displaying a progress bar.

Pete

On Thu, Mar 22, 2012 at 4:11 PM, Maarten Koopmans 
maarten.koopm...@gmail.com wrote:

 I scripted this using the read as binary etc. using 16KB buffers some time
 ago in pure LC. Much faster, and cross-platform.  Idon'thave the code here
 at hand, but it is really straightforward:

 Open the source file for read binary
 Open the destination file for write binary
 Read 16KB or whatever is left if it's less from the source into a buffer
 Append the buffer to the destination
 Loop until done
 Close the files

 Faster then revCopyFile (in fact, why doesn't itdo it this way) and no
 hassle with shells or external processes where you need to check if they
 actually did what you asked.

 HTH, Maarten

 On Thursday, March 22, 2012, Pete p...@mollysrevenge.com wrote:
  Hi Geoff,
  Thanks for the speed test info.  I'm not very familiar with shell
 commands
  so maybe you could let me know the command to use? What I need to do is
  copy a file to a different folder with a different file name.
 
  The lack of a progress bar might be a problem, but if the speed
 differences
  are as much as you found, there may not be a need for a progress bar at
 all.
 
  Also, I assume the shell commands would be different on Windows and Mac.
   That's an inconvenience because it means extra coding, but not a show
  stopper.
 
  Thanks,
  Pete
 
  On Wed, Mar 21, 2012 at 11:25 PM, Geoff Canyon gcan...@gmail.com
 wrote:
 
  The advantages derive from the fact that LiveCode isn't doing the actual
  copying with revCopyFile -- the Finder is. For completeness, the same
  advantage applies to using a shell command. You don't get a progress
 dialog
  though.
 
  Okay, I just did a quick one-off test with interface sounds off. For
 thirty
  files that were each about 70kb, using a shell command was about 3x
 faster
  than using revCopyFile. That's without taking advantage of the ability
 to
  move and rename in one step with a shell command. If that's what you're
  doing, the advantage would be even greater.
 
  On Wed, Mar 21, 2012 at 3:04 PM, Pete p...@mollysrevenge.com wrote:
 
   Thanks all for the input.  Sounds like Stephen's approach is the only
 way
   to get rid of it.  Seems like that setting will apply to other sounds
 as
   well, but I'm OK with that.
  
   As far as using AppleScript, I'm using revCopyFile because the
 dictionary
   claims there are certain advantages to using it over put URL or
 any
   other method, amongst which is that it does not require reading the
 file
   into memory, and since some of these files could be pretty large,
 that's
   significant.  On a Mac, it also displays a progress bar which I don;t
  think
   would be possible if I used put URL.
  
   Pete
  
   On Wed, Mar 21, 2012 at 11:35 AM, Geoff Canyon gcan...@gmail.com
  wrote:
  
I went straight to the shell command, so I don't know for sure, but
  this
sounds reasonable. There's also the overhead of spinning up
 AppleScript
   in
the first place. If Apple is doing that badly, that might also cause
problems I suppose.
   
On Wed, Mar 21, 2012 at 1:24 PM, stephen barncard 
stephenrevoluti...@barncard.com wrote:
   
 That was probably a big reason why multiple file transfers would
 take
more
 time - loading and unloading the sound - and perhaps the reason
 why
  it
 failed after memory was exceeded.

___
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
   
   
  
  
   --
   Pete
   Molly's Revenge http://www.mollysrevenge.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
 
 
 
 
  --
  Pete
  Molly's Revenge http://www.mollysrevenge.com
  ___
  use-liv
 ___
 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




-- 
Pete
Molly's Revenge http://www.mollysrevenge.com

Re: revCopyFile

2012-03-22 Thread J. Landman Gay

On 3/22/12 7:25 PM, Pete wrote:

Hi Maarten,
That's a nice solution.  Fast and doing it in chunks allows me to show a
progress bar.  I think I'll settle on that method.  Is there a way to get
the size of a file in LC?  With that, I could decide if it's even worth
displaying a progress bar.


The reason RR chose AppleScript is because it retains the metadata in a 
file, which a straight binary copy doesn't do. Apple is veering away 
from metadata though, so it may not be as important as it used to be.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: revCopyFile

2012-03-22 Thread Pete
Hi Jacque,
Yes, I saw that in the dictionary.  I don't think there's any metadata in
the files I will be copying (straight .txt files) but I'll have to check
that before going down this path.

I found the files function in the dictionary and it includes the file size
in one of it's formats but it lists all the files in the default folder,
not an individual file.  I guess it won;t take too long to get that and use
filter to narrow it down to the source file for the copy.

Pete

On Thu, Mar 22, 2012 at 6:55 PM, J. Landman Gay jac...@hyperactivesw.comwrote:

 On 3/22/12 7:25 PM, Pete wrote:

 Hi Maarten,
 That's a nice solution.  Fast and doing it in chunks allows me to show a
 progress bar.  I think I'll settle on that method.  Is there a way to get
 the size of a file in LC?  With that, I could decide if it's even worth
 displaying a progress bar.


 The reason RR chose AppleScript is because it retains the metadata in a
 file, which a straight binary copy doesn't do. Apple is veering away from
 metadata though, so it may not be as important as it used to be.

 --
 Jacqueline Landman Gay | jac...@hyperactivesw.com
 HyperActive Software   | http://www.hyperactivesw.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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode




-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: revCopyFile

2012-03-22 Thread J. Landman Gay

On 3/22/12 9:26 PM, Pete wrote:

Hi Jacque,
Yes, I saw that in the dictionary.  I don't think there's any metadata in
the files I will be copying (straight .txt files) but I'll have to check
that before going down this path.


It should be fine with text files.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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


revCopyFile

2012-03-21 Thread Pete
Anyone know of a way to get rid of that annoying sound when revCopyFile has
finished copying a file?  This is on a Mac, don't know if it happens in
Windows.


-- 
Pete
Molly's Revenge http://www.mollysrevenge.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: revCopyFile

2012-03-21 Thread stephen barncard
system preferences (apple menu) --sound--sound effects tab---

deselect Play User Interface Sound Effects checkbox

On 21 March 2012 10:34, Pete p...@mollysrevenge.com wrote:

 Anyone know of a way to get rid of that annoying sound when revCopyFile has
 finished copying a file?  This is on a Mac, don't know if it happens in
 Windows.


 --
 Pete
 Molly's Revenge http://www.mollysrevenge.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




-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  http://www.google.com/profiles/sbarncar
___
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: revCopyFile

2012-03-21 Thread Geoff Canyon
Funny, I went through this just a week ago. I found four reasons to abandon
revCopyFile for a shell command:

1. The sound.
2. It's slow.
3. For large numbers of commands it died on me.
4. It can't change the name of the file as part of the copy process.

I was trying to turn 1,700 files in one location into about 22,000 files
with different names in another location. I found that with revCopyFile and
renaming, it took several hours to do about 7,000 files and then died,
taking the Finder with it.

By changing to the command below, I ran the entire job with no sounds and
no problems in about fifteen minutes.

*on* shellCopyFile tSource,tTarget

   *get* shell(cp  quote  tSource  quote  quote  tTarget  quote)

   *if* it is not empty *then*

  *-- handle errors here*

   *end* *if*

*end* shellCopyFile

On Wed, Mar 21, 2012 at 12:34 PM, Pete p...@mollysrevenge.com wrote:

 Anyone know of a way to get rid of that annoying sound when revCopyFile has
 finished copying a file?  This is on a Mac, don't know if it happens in
 Windows.

___
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: revCopyFile

2012-03-21 Thread Bob Sneidar
I was gonna say Turn off your speakers? But I think I used up all my Smart 
A$$ quota for the month! ;-)

Bob


On Mar 21, 2012, at 10:40 AM, stephen barncard wrote:

 system preferences (apple menu) --sound--sound effects tab---
 
 deselect Play User Interface Sound Effects checkbox
 
 On 21 March 2012 10:34, Pete p...@mollysrevenge.com wrote:
 
 Anyone know of a way to get rid of that annoying sound when revCopyFile has
 finished copying a file?  This is on a Mac, don't know if it happens in
 Windows.
 
 
 --
 Pete
 Molly's Revenge http://www.mollysrevenge.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
 
 
 
 
 -- 
 
 
 
 Stephen Barncard
 San Francisco Ca. USA
 
 more about sqb  http://www.google.com/profiles/sbarncar
 ___
 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: revCopyFile

2012-03-21 Thread Mark Wieder
Bob-

Wednesday, March 21, 2012, 10:49:00 AM, you wrote:

 I was gonna say Turn off your speakers? But I think I used up
 all my Smart A$$ quota for the month! ;-)

Uh oh. There's a quota?
I am so gonna be in trouble now...

-- 
-Mark Wieder
 mwie...@ahsoftware.net


___
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: revCopyFile

2012-03-21 Thread Richmond

Presumably, buried somewhere amongst the Livecode stacks there is
an AudioClip. I suppose one could trawl through them with the
application browser and remove it...

___
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


revCopyFile progress window not showing in front

2011-10-05 Thread stephen barncard
Hello gang,

 using revCopyFile and it works great on Mac (internally a shell call)- and
I noticed there is a very nice progress indicator provided but it appears
behind the window/stack that launched it and is basically useless as it's
always obfuscated.

Is there a way to make this indicator show in front or is this a bug? As
revCopyFile is blocking, it's not possible to do anything to bring it
forward after starting  (unless 'send in time??)

sqb

-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  http://www.google.com/profiles/sbarncar
___
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: revCopyFile progress window not showing in front

2011-10-05 Thread Mark Schonewille
Hi,

I believe this progress indicator shouldn't be visible at all. It is 
AppleScript and in my view it isn't done very well. The progress indicator you 
see is part of the Finder, not LiveCode.

Perhaps you could use some GUI scripting to bring that particular window of the 
Finder to front, but I expect it to be a big hassle. If you would consider 
using LiveCode's read and write commands, you could create your own progress 
indicator. Another option is to write a better AppleScript programme that 
doesn't display the progress indicator. Another option is to use the cp or mv 
command in the shell and use a gif image of a circular progress indicator. 
Although I don't like circular progress indicators, this solution works very 
nicely.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

See what you get with only a small contribution. All our LiveCode downloads are 
listed at http://qery.us/zr

On 5 okt 2011, at 21:56, stephen barncard wrote:

 Hello gang,
 
 using revCopyFile and it works great on Mac (internally a shell call)- and
 I noticed there is a very nice progress indicator provided but it appears
 behind the window/stack that launched it and is basically useless as it's
 always obfuscated.
 
 Is there a way to make this indicator show in front or is this a bug? As
 revCopyFile is blocking, it's not possible to do anything to bring it
 forward after starting  (unless 'send in time??)
 
 sqb
 
 -- 
 


___
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: revCopyFile progress window not showing in front

2011-10-05 Thread stephen barncard
Thanks Mark. See below.

On 5 October 2011 13:07, Mark Schonewille
m.schonewi...@economy-x-talk.comwrote:

 Hi,

 I believe this progress indicator shouldn't be visible at all. It is
 AppleScript and in my view it isn't done very well. The progress indicator
 you see is part of the Finder, not LiveCode.


Mark, it's not applescript (fortunately) any more except for OS 9 which is
no longer supported by Rev.

From the docs:

On Mac OS systems, it uses AppleScript; on OS X, Windows and Unix systems,
it uses the shell function.

I didn't know this either until I read the docs.

And I *really did* see it, lurking behind.  It's incredibly fast, which
Applescript is not and why I'd rather not 'roll my own' - which could be
slower. Also  I don't think read and write commands handle resource forks or
packages properly. And yes I know it's NOT a livecode routine, but as it's
 a shell call - it should have some option for this. I'm calling it a bug
for now.

This stack takes a list of files by file suffix (using Ben's non-recursive
file and folder walker), does a second managed pass and creates categorical
folders named by the suffix chosen, then moves the chosen files to the
folders. Incredibly fast. Works great except for the progress dialog that
hides.
It's a great progress indicator and only shows on bigger file transfers.
Small ones don't show. As it should be.

 I created this to try and clean up folders of misc crap on my
desktophttp://fulton.barncard.com/stax/filesorter.pngand doing this
by hand was tedious and inaccurate.

the UI is funky but hey, it's made for me

thanks

is this thing useful to anyone else, BTW?

sqb




 Perhaps you could use some GUI scripting to bring that particular window of
 the Finder to front, but I expect it to be a big hassle. If you would
 consider using LiveCode's read and write commands, you could create your own
 progress indicator. Another option is to write a better AppleScript
 programme that doesn't display the progress indicator. Another option is to
 use the cp or mv command in the shell and use a gif image of a circular
 progress indicator. Although I don't like circular progress indicators, this
 solution works very nicely.

 --
 Best regards,

 Mark Schonewille

 Economy-x-Talk Consulting and Software Engineering
 Homepage: http://economy-x-talk.com
 Twitter: http://twitter.com/xtalkprogrammer
 KvK: 50277553

 See what you get with only a small contribution. All our LiveCode downloads
 are listed at http://qery.us/zr

 On 5 okt 2011, at 21:56, stephen barncard wrote:

  Hello gang,
 
  using revCopyFile and it works great on Mac (internally a shell call)-
 and
  I noticed there is a very nice progress indicator provided but it appears
  behind the window/stack that launched it and is basically useless as it's
  always obfuscated.
 
  Is there a way to make this indicator show in front or is this a bug? As
  revCopyFile is blocking, it's not possible to do anything to bring it
  forward after starting  (unless 'send in time??)
 
  sqb
 
  --
 


 ___
 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




-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  http://www.google.com/profiles/sbarncar
___
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: revCopyFile progress window not showing in front

2011-10-05 Thread Mark Schonewille
Hi Stephen,

The docs are wrong. RevCopyFile uses AppleScript, not the shell, on Mac OS X.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

See what you get with only a small contribution. All our LiveCode downloads are 
listed at http://qery.us/zr

On 5 okt 2011, at 23:21, stephen barncard wrote:

 Thanks Mark. See below.
 
 On 5 October 2011 13:07, Mark Schonewille
 m.schonewi...@economy-x-talk.comwrote:
 
 Hi,
 
 I believe this progress indicator shouldn't be visible at all. It is
 AppleScript and in my view it isn't done very well. The progress indicator
 you see is part of the Finder, not LiveCode.
 
 
 Mark, it's not applescript (fortunately) any more except for OS 9 which is
 no longer supported by Rev.
 
 From the docs:
 
 On Mac OS systems, it uses AppleScript; on OS X, Windows and Unix systems,
 it uses the shell function.
 
 I didn't know this either until I read the docs.
 
 And I *really did* see it, lurking behind.  It's incredibly fast, which
 Applescript is not and why I'd rather not 'roll my own' - which could be
 slower. Also  I don't think read and write commands handle resource forks or
 packages properly. And yes I know it's NOT a livecode routine, but as it's
 a shell call - it should have some option for this. I'm calling it a bug
 for now.
 
 This stack takes a list of files by file suffix (using Ben's non-recursive
 file and folder walker), does a second managed pass and creates categorical
 folders named by the suffix chosen, then moves the chosen files to the
 folders. Incredibly fast. Works great except for the progress dialog that
 hides.
 It's a great progress indicator and only shows on bigger file transfers.
 Small ones don't show. As it should be.
 
 I created this to try and clean up folders of misc crap on my
 desktophttp://fulton.barncard.com/stax/filesorter.pngand doing this
 by hand was tedious and inaccurate.
 
 the UI is funky but hey, it's made for me
 
 thanks
 
 is this thing useful to anyone else, BTW?
 
 sqb


___
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: revCopyFile progress window not showing in front

2011-10-05 Thread stephen barncard
Are you saying that inside a stack inside the bundle there is a  do as
applescript in the script for this command?

hard to believe - it's pretty responsive.

On 5 October 2011 14:40, Mark Schonewille
m.schonewi...@economy-x-talk.comwrote:

 Hi Stephen,

 The docs are wrong. RevCopyFile uses AppleScript, not the shell, on Mac OS
 X.

 --

___
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: revCopyFile progress window not showing in front

2011-10-05 Thread Mark Schonewille
Yup.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

See what you get with only a small contribution. All our LiveCode downloads are 
listed at http://qery.us/zr

On 5 okt 2011, at 23:48, stephen barncard wrote:

 Are you saying that inside a stack inside the bundle there is a  do as
 applescript in the script for this command?
 
 hard to believe - it's pretty responsive.


___
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: revCopyFile progress window not showing in front

2011-10-05 Thread J. Landman Gay

On 10/5/11 2:56 PM, stephen barncard wrote:

Hello gang,

  using revCopyFile and it works great on Mac (internally a shell call)- and
I noticed there is a very nice progress indicator provided but it appears
behind the window/stack that launched it and is basically useless as it's
always obfuscated.

Is there a way to make this indicator show in front or is this a bug?


I'm pretty sure the progress bar is coming from the Finder, so if Finder 
isn't in front, the bar won't be either.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.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: revCopyFile slow?

2011-04-14 Thread Maarten Koopmans
Actually, the below functions work pretty fast on Win7 (will test on OS X).
Added them as a back script works nicely. Credit where credit is due,
the fileSize function I grabbed from the mailing list (weird that such a
thing is not readily available)

function fileSize pFilePath
   -- split the file path into the folder and url-encoded file name
   local tFolder, tEncodedFile
   set the itemDelimiter to slash
   put item 1 to -2 of pFilePath into tFolder
   put urlEncode(item -1 of pFilePath) into tEncodedFile
   set the itemDelimiter to comma
   -- now change the defaultfolder and get the detailed files information
   local tOldDefaultFolder, tDetailedFiles
   put the defaultFolder into tOldDefaultFolder
   set the defaultFolder to tFolder
   put the detailed files into tDetailedFiles
   set the defaultFolder to tOldDefaultFolder
   -- filter down the list to just the file we're interested in
   filter tDetailedFiles with (tEncodedFile  ,*)
   return (item 2 of tDetailedFiles + item 3 of tDetailedFiles)
end FileSize

on copyFile source,destination
   --revCopyFile source,destination
   put fileSize(source) into theSize
   open file source for binary read
   open file destination for binary write

   put 16384 into buflen

   repeat until  theSize is 0
  if theSize 16384 then put 16384 into buflen
  read from file source for  buflen
  write it to file destination
  subtract buflen from theSize
  put theSize into buflen
   end repeat

  close file source
  close file destination
end copyFile

On Sun, Apr 10, 2011 at 4:57 PM, Mike Bonner bonnm...@gmail.com wrote:

 For shell windows showing look at the property hideConsoleWindows

 If you're worried about shell blocking, could do your file management stuff
 as a process instead.

 Syntax:
 open process appName [for [text|binary] {read | write | update | neither}]

 Haven't done much with open process myself, but can probably do what you
 want that way.

 On Sun, Apr 10, 2011 at 8:49 AM, Maarten Koopmans 
 maarten.koopm...@gmail.com wrote:

  I'll try the command shell, I hope the command window doesn't show.
  Blocking behavior is another fear ( why revCopyFile is unacceptable).
 
  Thanks for all the hints and advice everybody!
 
  --Maarten
 
  On Sunday, April 10, 2011, Jim Ault jimaultw...@yahoo.com wrote:
   On Apr 10, 2011, at 5:31 AM, Mark Schonewille wrote:
  
   Maarten,
   That depends on many factors. I have been in situations where writing a
  few tens of thousands of files too hours using read/write, while using
 the
  shell command took a few minutes. I have also been in situations where
  read/write was actually the preferred method. If it is about speed,
 though,
  I'd go with the command line. You can do the benchmarking if it really
  matters to you.
  
  
   And if you program your progress bar to show
   movie trailers, sports highlights, or car crashes,
   the user won't mind so much if the file writing process is slower.
  
   Jim Ault
   Las Vegas
  
  
   On 10 apr 2011, at 14:14, Maarten Koopmans wrote:
  
  
   Really?  Ever benchmarked open, read, write on files? How slow are
 they?
  
  
  
  
  
  
  
   ___
   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

___
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: revCopyFile slow?

2011-04-10 Thread Maarten Koopmans
Yes, but a simple rev implementation should be as fast and
cross-platform (windows Mobile.)

On Sunday, April 10, 2011, Web Admin Himalayan Academy ka...@hindu.org wrote:
  On 4/8/11 6:25 AM, Maarten Koopmans wrote:

 I'll just write a copyfile function in LC then. That should be near-C
 speed, assuming open/read/write are implemented close to the os.

 Thanks, Maarten

 I would second Mark's option to use shell, I have a complete in-house version 
 control system for InDesign files that runs pretty much entirely using cp and 
 mv  .

 These all run about as fast as the network and disk I/0 can handle...

 e.g.

 command Checkout pFileName

    CheckServerIsMounted

    if the uServerMounted of this stack  true then
       answer  Sorry, Server is not mounted, you cannot check out files. 
 with OK
       exit to top
    end if
    # Make a copy in Versions Archive
    put (the uServerProjectPath of this stack) / pFileName into 
 tCurrentLocationPath
    put tCurrentLocationPath into tArchivePath
    set the itemDelimiter to /
    put /Versions Archive after item 5 of tArchivePath
    put (cp   quote  tCurrentLocationPath  quote   quote  
 tArchivePath  quote) into tShell
    get shell (tShell)

    # update Control string and rename the top level file

    put the uUserInitials of this stack into char -7 to -6 of pFileName
    replace -ci- with -co- in pFileName
    put (the uServerProjectPath of this stack) / pFileName into 
 tNewNamePath
    put (mv   quote  tCurrentLocationPath  quote   quote  
 tNewNamePath  quote) into tShell
    get shell (tShell)

         # Copy to local folder
      put gLocalProjectPath / pFileName into tNewLocalPath
    put (cp   quote  tNewNamePath  quote   quote  tNewLocalPath  
 quote) into tShell
    get shell (tShell)

       # update GUI now

    LoadVersionFiles gCurrentProject

    # boot InDesign and edit

    launch (tNewLocalPath) with (the uInDesignPath of this stack)  # expand to 
 handle other file types


 end Checkout

 ___
 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: revCopyFile slow?

2011-04-10 Thread Maarten Koopmans
Really?  Ever benchmarked open, read, write on files? How slow are they?

On Sunday, April 10, 2011, Mark Schonewille
m.schonewi...@economy-x-talk.com wrote:
 Cross-platform yes, fast no.

 --
 Best regards,

 Mark Schonewille

 Economy-x-Talk Consulting and Software Engineering
 Homepage: http://economy-x-talk.com
 Twitter: http://twitter.com/xtalkprogrammer
 KvK: 50277553

 New: Download the Installer Maker Plugin 1.6 for LiveCode here 
 http://qery.us/ce

 On 10 apr 2011, at 13:36, Maarten Koopmans wrote:

 Yes, but a simple rev implementation should be as fast and
 cross-platform (windows Mobile.)


 ___
 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: revCopyFile slow?

2011-04-10 Thread Mark Schonewille
Maarten,

That depends on many factors. I have been in situations where writing a few 
tens of thousands of files too hours using read/write, while using the shell 
command took a few minutes. I have also been in situations where read/write was 
actually the preferred method. If it is about speed, though, I'd go with the 
command line. You can do the benchmarking if it really matters to you.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce

On 10 apr 2011, at 14:14, Maarten Koopmans wrote:

 Really?  Ever benchmarked open, read, write on files? How slow are they?



___
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: revCopyFile slow?

2011-04-10 Thread Jim Ault

On Apr 10, 2011, at 5:31 AM, Mark Schonewille wrote:

Maarten,
That depends on many factors. I have been in situations where  
writing a few tens of thousands of files too hours using read/write,  
while using the shell command took a few minutes. I have also been  
in situations where read/write was actually the preferred method. If  
it is about speed, though, I'd go with the command line. You can do  
the benchmarking if it really matters to you.



And if you program your progress bar to show
movie trailers, sports highlights, or car crashes,
the user won't mind so much if the file writing process is slower.

Jim Ault
Las Vegas


On 10 apr 2011, at 14:14, Maarten Koopmans wrote:

Really?  Ever benchmarked open, read, write on files? How slow are  
they?







___
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: revCopyFile slow?

2011-04-10 Thread Maarten Koopmans
I'll try the command shell, I hope the command window doesn't show.
Blocking behavior is another fear ( why revCopyFile is unacceptable).

Thanks for all the hints and advice everybody!

--Maarten

On Sunday, April 10, 2011, Jim Ault jimaultw...@yahoo.com wrote:
 On Apr 10, 2011, at 5:31 AM, Mark Schonewille wrote:

 Maarten,
 That depends on many factors. I have been in situations where writing a few 
 tens of thousands of files too hours using read/write, while using the shell 
 command took a few minutes. I have also been in situations where read/write 
 was actually the preferred method. If it is about speed, though, I'd go with 
 the command line. You can do the benchmarking if it really matters to you.


 And if you program your progress bar to show
 movie trailers, sports highlights, or car crashes,
 the user won't mind so much if the file writing process is slower.

 Jim Ault
 Las Vegas


 On 10 apr 2011, at 14:14, Maarten Koopmans wrote:


 Really?  Ever benchmarked open, read, write on files? How slow are they?







 ___
 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: revCopyFile slow?

2011-04-10 Thread Mark Schonewille
Maarten,

Whether using the shell blocks your interface depends on the size of your 
files. Copying one very big file is likely to be blocking, but copying many 
small files in a repeat loop should hardly interfere with user interaction.

I really think you should give all options a try and choose the best one.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce

On 10 apr 2011, at 16:49, Maarten Koopmans wrote:

 I'll try the command shell, I hope the command window doesn't show.
 Blocking behavior is another fear ( why revCopyFile is unacceptable).
 
 Thanks for all the hints and advice everybody!
 
 --Maarten


___
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: revCopyFile slow?

2011-04-10 Thread Mike Bonner
For shell windows showing look at the property hideConsoleWindows

If you're worried about shell blocking, could do your file management stuff
as a process instead.

Syntax:
open process appName [for [text|binary] {read | write | update | neither}]

Haven't done much with open process myself, but can probably do what you
want that way.

On Sun, Apr 10, 2011 at 8:49 AM, Maarten Koopmans 
maarten.koopm...@gmail.com wrote:

 I'll try the command shell, I hope the command window doesn't show.
 Blocking behavior is another fear ( why revCopyFile is unacceptable).

 Thanks for all the hints and advice everybody!

 --Maarten

 On Sunday, April 10, 2011, Jim Ault jimaultw...@yahoo.com wrote:
  On Apr 10, 2011, at 5:31 AM, Mark Schonewille wrote:
 
  Maarten,
  That depends on many factors. I have been in situations where writing a
 few tens of thousands of files too hours using read/write, while using the
 shell command took a few minutes. I have also been in situations where
 read/write was actually the preferred method. If it is about speed, though,
 I'd go with the command line. You can do the benchmarking if it really
 matters to you.
 
 
  And if you program your progress bar to show
  movie trailers, sports highlights, or car crashes,
  the user won't mind so much if the file writing process is slower.
 
  Jim Ault
  Las Vegas
 
 
  On 10 apr 2011, at 14:14, Maarten Koopmans wrote:
 
 
  Really?  Ever benchmarked open, read, write on files? How slow are they?
 
 
 
 
 
 
 
  ___
  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: revCopyFile slow?

2011-04-09 Thread Web Admin Himalayan Academy

 On 4/8/11 6:25 AM, Maarten Koopmans wrote:

I'll just write a copyfile function in LC then. That should be near-C
speed, assuming open/read/write are implemented close to the os.

Thanks, Maarten
I would second Mark's option to use shell, I have a complete in-house 
version control system for InDesign files that runs pretty much entirely 
using cp and mv  .


These all run about as fast as the network and disk I/0 can handle...

e.g.

command Checkout pFileName

   CheckServerIsMounted

   if the uServerMounted of this stack  true then
  answer  Sorry, Server is not mounted, you cannot check out 
files. with OK

  exit to top
   end if
   # Make a copy in Versions Archive
   put (the uServerProjectPath of this stack) / pFileName into 
tCurrentLocationPath

   put tCurrentLocationPath into tArchivePath
   set the itemDelimiter to /
   put /Versions Archive after item 5 of tArchivePath
   put (cp   quote  tCurrentLocationPath  quote   quote  
tArchivePath  quote) into tShell

   get shell (tShell)

   # update Control string and rename the top level file

   put the uUserInitials of this stack into char -7 to -6 of pFileName
   replace -ci- with -co- in pFileName
   put (the uServerProjectPath of this stack) / pFileName into 
tNewNamePath
   put (mv   quote  tCurrentLocationPath  quote   quote  
tNewNamePath  quote) into tShell

   get shell (tShell)

# Copy to local folder
 put gLocalProjectPath / pFileName into tNewLocalPath
   put (cp   quote  tNewNamePath  quote   quote  
tNewLocalPath  quote) into tShell

   get shell (tShell)

  # update GUI now

   LoadVersionFiles gCurrentProject

   # boot InDesign and edit

   launch (tNewLocalPath) with (the uInDesignPath of this stack)  # 
expand to handle other file types



end Checkout

___
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


revCopyFile slow?

2011-04-08 Thread Maarten Koopmans
Hi,

I just started using revCopyFile, and well, on my Mac it felt. slow.
Is that normal? Any faster way to do it - or just write my own in2out file
copy?

--Maarten
___
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: revCopyFile slow?

2011-04-08 Thread Mark Schonewille
Hi Maarten,

Yes, it is slow, because the underlying AppleScript needs to be compiled every 
time it is used. For big files, it might be useful, but if you have to copy 
many small files, it is a disaster. The safest and quickes option is probably 
to use the cp shell command.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce

On 8 apr 2011, at 17:38, Maarten Koopmans wrote:

 Hi,
 
 I just started using revCopyFile, and well, on my Mac it felt. slow.
 Is that normal? Any faster way to do it - or just write my own in2out file
 copy?
 
 --Maarten



___
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: revCopyFile slow?

2011-04-08 Thread Maarten Koopmans
I'll just write a copyfile function in LC then. That should be near-C
speed, assuming open/read/write are implemented close to the os.

Thanks, Maarten

On Friday, April 8, 2011, Mark Schonewille
m.schonewi...@economy-x-talk.com wrote:
 Hi Maarten,

 Yes, it is slow, because the underlying AppleScript needs to be compiled 
 every time it is used. For big files, it might be useful, but if you have to 
 copy many small files, it is a disaster. The safest and quickes option is 
 probably to use the cp shell command.

 --
 Best regards,

 Mark Schonewille

 Economy-x-Talk Consulting and Software Engineering
 Homepage: http://economy-x-talk.com
 Twitter: http://twitter.com/xtalkprogrammer
 KvK: 50277553

 New: Download the Installer Maker Plugin 1.6 for LiveCode here 
 http://qery.us/ce

 On 8 apr 2011, at 17:38, Maarten Koopmans wrote:

 Hi,

 I just started using revCopyFile, and well, on my Mac it felt. slow.
 Is that normal? Any faster way to do it - or just write my own in2out file
 copy?

 --Maarten



 ___
 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