Problem with revCopyFile

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with revCopyFile

John Dixon
Hi....

Could someone tell me why revCopyFile and revCopyFolder will not work in the script below when run as a standalone under Mac OS X.... everything is fine in the IDE...

The folders are created but the file and folder that I wish to copy are not copied...

---------------------------------------------------------------

global gdefaultFolder

on mouseUp
   if fld 1 is empty then exit mouseUp
   answer folder "Select a folder in which to build the presentation"
   if it is empty then exit mouseUp
   
   set the defaultFolder to it
   put it into theFolderPath
   
   put line 1 of fld 1 into theFolderName
   
   create folder theFolderName
   create folder theFolderName & "/BernierResources"
   create folder theFolderName & "/BernierResources/capitons"
   create folder theFolderName & "/BernierResources/cercueils"
   create folder theFolderName & "/BernierResources/cercueilsCroix"
   create folder theFolderName & "/BernierResources/cercueilsEnfant"
   create folder theFolderName & "/BernierResources/emblemes"
   create folder theFolderName & "/BernierResources/urnes"
   
   revCopyFile (gdefaultFolder & "/Bernier Master.rev"), (theFolderPath & "/" & theFolderName)
   revCopyFolder (gdefaultFolder & "/BernierResources/BernierData"), theFolderPath & "/" & theFolderName & "/BernierResources"
   
   rename (theFolderPath & "/" & theFolderName & "/Bernier Master.rev") to (theFolderPath & "/" & theFolderName & "/Presentation.rev")
   
   put empty into fld 1
   open stack (theFolderPath & "/" & theFolderName & "/Presentation.rev")
end mouseUp

---------------------------------------------------------------

Any help appreciated...

be well

Dixie
Reply | Threaded
Open this post in threaded view
|

Re: Problem with revCopyFile

JosepM
Hi,

I get the same problem and I solved using a shell copy command.

put "your folder path A" into tFolderA
put "your folder path B" into tFolderB

put ("cp -R -p ""e&tFolderA"e&"e&tFolderB"e) into tCommand
get shell(tCommand)

Salut,
Josep
Reply | Threaded
Open this post in threaded view
|

RE: Problem with revCopyFile

John Dixon

Josep...

Thanks for your quick reply... my knowledge of unix is positively dangerous, so I have to ask the question 'Will your shell copy command solution work for a file as well as a folder ?'

> I get the same problem and I solved using a shell copy command.
>
> put "your folder path A" into tFolderA
> put "your folder path B" into tFolderB
>
> put ("cp -R -p "&quote&tFolderA&quote&&quote&tFolderB&quote) into tCommand
> get shell(tCommand)
>
> Salut,
> Josep


kind regards,

John Dixon

     
_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
Do you have a story that started on Hotmail? Tell us now_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Problem with revCopyFile

JosepM
Hi John,

With -R param the command cp copy folders and subfolders. I must use in this way so I needed to copy bundle file, that inside them have any folders. I don't test with folders and subfolders but I guess that work without problem.

Salut,
Josep
Reply | Threaded
Open this post in threaded view
|

Re: Problem with revCopyFile

Kay C Lan
In reply to this post by John Dixon
Hi John,

How do you set gdefaultFolder?

Have you read the first User Note in the Dictionary under 'defaultFolder'?

Add this line to your script after you have created all the extra folders
and before doing copyFile:

answer gdefaultFolder with "OK" or "Cancel" titled "What's in
gdefaultFolder?"
if it = "Cancel" then exit mouseUp

Rebuild your standalone and see if gdefaultFolder is where you expect it to
be.

If it isn't I'd suggest going to where it's pointing and Trash the misplaced
folders :-)

HTH

On Mon, Jun 14, 2010 at 3:14 PM, John Dixon <[hidden email]> wrote:

>
> Hi....
>
> Could someone tell me why revCopyFile and revCopyFolder will not work in
> the
> script below when run as a standalone under Mac OS X.... everything is fine
> in the IDE...
>
> The folders are created but the file and folder that I wish to copy are not
> copied...
>
> ---------------------------------------------------------------
>
> global gdefaultFolder
>
> on mouseUp
>   if fld 1 is empty then exit mouseUp
>   answer folder "Select a folder in which to build the presentation"
>   if it is empty then exit mouseUp
>
>   set the defaultFolder to it
>   put it into theFolderPath
>
>   put line 1 of fld 1 into theFolderName
>
>   create folder theFolderName
>   create folder theFolderName & "/BernierResources"
>   create folder theFolderName & "/BernierResources/capitons"
>   create folder theFolderName & "/BernierResources/cercueils"
>   create folder theFolderName & "/BernierResources/cercueilsCroix"
>   create folder theFolderName & "/BernierResources/cercueilsEnfant"
>   create folder theFolderName & "/BernierResources/emblemes"
>   create folder theFolderName & "/BernierResources/urnes"
>
>   revCopyFile (gdefaultFolder & "/Bernier Master.rev"), (theFolderPath &
> "/" & theFolderName)
>   revCopyFolder (gdefaultFolder & "/BernierResources/BernierData"),
> theFolderPath & "/" & theFolderName & "/BernierResources"
>
>   rename (theFolderPath & "/" & theFolderName & "/Bernier Master.rev") to
> (theFolderPath & "/" & theFolderName & "/Presentation.rev")
>
>   put empty into fld 1
>   open stack (theFolderPath & "/" & theFolderName & "/Presentation.rev")
> end mouseUp
>
> ---------------------------------------------------------------
>
> Any help appreciated...
>
> be well
>
> Dixie
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Problem-with-revCopyFile-tp2253990p2253990.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: Problem with revCopyFile

John Dixon





Thankyou for your reply...

Yes, the global variable gdefaultfolder has a
 value , it is set when the stack first opens in the preOpenStack
handler using :-



-----------------------------------------------------------------------------------

global gdefaultFolder



on preOpenstack

   set itemDel to "/"

   put item 1 to -2 of (the effective fileName of this stack) into
gdefaultFolder

   set the defaultfolder to gdefaultFolder

 

   set the loc of this stack to screenLoc()

end preOpenstack



-----------------------------------------------------------------------------------



I put the following line into the ' mouseUp' handler to see if the
engine believes the file exists :



put there is a file (gdefaultFolder & "/Bernier Master.rev")   .... it returns true

Still stumped !...

regards,

John Dixon
     
_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
Do you have a story that started on Hotmail? Tell us now_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution