Digg this topic Add to my del.icio.us Submit to SlashDot  
Reply to this topicStart new topic
> FileCopy, not sufficient for complex scripts
psc
post Nov 1 2006, 07:02 PM
Post #1


Guru
***

Group: .script developer
Posts: 3,042
Joined: 14-July 06
From: Korschenbroich, Germany
Member No.: 3


Germany


When writing a script to deliver an application, there can be ten or hundred of 'FileCopy' lines, depending on the application you are writing the script for.

My suggestions:
1st have wildcards like
CODE
FileCopy,%MyProgDir%\*,dll,%MyTarget%

2nd expand to
CODE
DirCopy,%MyProgDir%\*,dll,%MyTarget%
(DirCopy is recursive!)

Peter
Go to the top of the page
 
+Quote Post
smiley
post Nov 1 2006, 07:07 PM
Post #2


Advanced Member
***

Group: .script developer
Posts: 1,014
Joined: 11-August 06
Member No.: 149


Greece


QUOTE(psc @ Nov 1 2006, 09:02 PM) *

When writing a script to deliver an application, there can be ten or hundred of 'FileCopy' lines, depending on the application you are writing the script for.

My suggestions:
1st have wildcards like
CODE
FileCopy,%MyProgDir%\*,dll,%MyTarget%

2nd expand to
CODE
DirCopy,%MyProgDir%\*,dll,%MyTarget%
(DirCopy is recursive!)

Peter

(IMG:../forums/style_emoticons/default/blink.gif)
I thought that it was working


John
Go to the top of the page
 
+Quote Post
psc
post Nov 1 2006, 07:23 PM
Post #3


Guru
***

Group: .script developer
Posts: 3,042
Joined: 14-July 06
From: Korschenbroich, Germany
Member No.: 3


Germany


QUOTE(smiley @ Nov 1 2006, 08:07 PM) *

(IMG:../forums/style_emoticons/default/blink.gif)
I thought that it was working
John

Maybe I did something wrong, but I did not get the assumed result with wildchards.
(I'm going to test again)

Peter
Go to the top of the page
 
+Quote Post
yahoouk
post Nov 26 2006, 06:59 PM
Post #4


Advanced Member
***

Group: .script developer
Posts: 124
Joined: 7-November 06
Member No.: 1,115



QUOTE(psc @ Nov 1 2006, 07:23 PM) *

..........result with wildchards.

Peter


Yes, me too, script can't recornise wildcards.

Thanks
Go to the top of the page
 
+Quote Post
Nuno Brito
post Nov 26 2006, 10:51 PM
Post #5


Advanced Member
***

Group: .script developer
Posts: 4,203
Joined: 13-July 06
From: Azores
Member No.: 1


Portugal


QUOTE(yahoouk @ Nov 26 2006, 06:59 PM) *

Yes, me too, script can't recornise wildcards.

Thanks


Let's fix it then!! (IMG:../forums/style_emoticons/default/cheers.gif)
Go to the top of the page
 
+Quote Post
yahoouk
post Nov 29 2006, 10:53 PM
Post #6


Advanced Member
***

Group: .script developer
Posts: 124
Joined: 7-November 06
Member No.: 1,115



QUOTE(Nuno Brito @ Nov 26 2006, 10:51 PM) *


I got it now. (IMG:../forums/style_emoticons/default/cheers.gif) No need to repair anything.
Instead of using \*, we have to use *.* or *.dll or *.exe or so on. (IMG:../forums/style_emoticons/default/wink.gif)
For Instance,
QUOTE
FileCopy,"%ScriptDir%\MyFolder\*.dll","%TargetDir%\I386\System32" -------> all dll files in MyFolder will be copied to System32 folder.
DirCopy,"%ScriptDir%\MyFolder","%ProgDir%" ------------> MyFolder will be copied to Programs folder.


It works for me very simply to copy file/s or folder/s.
I tested building vnc server, works perfectly, I suppose. (IMG:../forums/style_emoticons/default/what.gif)

Thanks to all. (IMG:../forums/style_emoticons/default/thumbup.gif)
Go to the top of the page
 
+Quote Post
edborg
post Dec 5 2006, 08:44 AM
Post #7


Advanced Member
***

Group: .script developer
Posts: 259
Joined: 14-July 06
Member No.: 4



QUOTE(yahoouk @ Nov 29 2006, 11:53 PM) *

I got it now. (IMG:../forums/style_emoticons/default/cheers.gif) No need to repair anything.
Instead of using \*, we have to use *.* or *.dll or *.exe or so on. (IMG:../forums/style_emoticons/default/wink.gif)
For Instance,
QUOTE
FileCopy,"%ScriptDir%\MyFolder\*.dll","%TargetDir%\I386\System32" -------> all dll files in MyFolder will be copied to System32 folder.
DirCopy,"%ScriptDir%\MyFolder","%ProgDir%" ------------> MyFolder will be copied to Programs folder.

It works for me very simply to copy file/s or folder/s.
I tested building vnc server, works perfectly, I suppose. (IMG:../forums/style_emoticons/default/what.gif)

Thanks to all. (IMG:../forums/style_emoticons/default/thumbup.gif)

I've tried what you say, just to discover that unfortunately it's not like that.
As posted above, wildcards are not allowed yet (WB 053 beta5).
(IMG:../forums/style_emoticons/default/sad.gif)
They'd be very useful, though.
edborg
Go to the top of the page
 
+Quote Post
Nuno Brito
post Dec 5 2006, 10:58 AM
Post #8


Advanced Member
***

Group: .script developer
Posts: 4,203
Joined: 13-July 06
From: Azores
Member No.: 1


Portugal


I'm using winapi to copy the files, like in the ROS project inside the copy files script.

CODE
FileCopy,"%ProjectDir%\%SourceFolder%\*.*","%TargetDir%"


Would you mind posting the code or a script snippet for testing?

Thanks! (IMG:../forums/style_emoticons/default/cheers.gif)
Go to the top of the page
 
+Quote Post
edborg
post Dec 5 2006, 12:43 PM
Post #9


Advanced Member
***

Group: .script developer
Posts: 259
Joined: 14-July 06
Member No.: 4



QUOTE(Nuno Brito @ Dec 5 2006, 11:58 AM) *

I'm using winapi to copy the files, like in the ROS project inside the copy files script.

CODE
FileCopy,"%ProjectDir%\%SourceFolder%\*.*","%TargetDir%"


Would you mind posting the code or a script snippet for testing?

Thanks! (IMG:../forums/style_emoticons/default/cheers.gif)

(IMG:../forums/style_emoticons/default/blink.gif) (IMG:../forums/style_emoticons/default/blink.gif) (IMG:../forums/style_emoticons/default/blink.gif)
You're right: I did a test script, and it works as you say!!!
I can't imagine why it kept giving me errors in Winbuilder until I removed wildcards. (IMG:../forums/style_emoticons/default/blink.gif)
In order to avoid unnecessary confusion to others, I suggest you remove your post above, and I shall remove mine.
edborg
Attached File(s)
Attached File  TestWildcards.script ( 594bytes ) Number of downloads: 9
 
Go to the top of the page
 
+Quote Post
Nuno Brito
post Dec 5 2006, 12:50 PM
Post #10


Advanced Member
***

Group: .script developer
Posts: 4,203
Joined: 13-July 06
From: Azores
Member No.: 1


Portugal


Better leave for others to see how to solve it - I also had my doubts but perhaps this will also help to understand how it can be used.

Probably will mention this on the wiki as well.. (IMG:../forums/style_emoticons/default/smile.gif)
Go to the top of the page
 
+Quote Post
« Next Oldest · Suggestions and Requests · Next Newest »
 

Fast ReplyReply to this topicStart new topic

Collapse

> Similar Topics

  Topic Replies Topic Starter Views Last Action
No New Posts [Suggestion] FileCopy
1 h7se 459 31st January 2007 - 12:03 PM
Last post by: Nuno Brito


 

Display Mode: Standard · Switch to: Linear+ · Switch to: Outline

Track this topic · Email this topic · Print this topic · Subscribe to this forum

- Lo-Fi Version Time is now: 15th October 2007 - 10:22 PM

MKPortal ©2003-2006 mkportal.it