Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently November 1st, 2024, 1:28 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: CopyFile Question
PostPosted: June 10th, 2007, 2:42 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
Is there a way to copyFile from D1 to D2 and put D2 in a variable?
I can put D1 in a variable but I don't know how to put D2? Please Help!


For this message opuslover has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: June 10th, 2007, 4:34 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
I found this in the Opus manual

CopyFile( Source, Destination, MsgBox )
Return:
true if the specified file is copied and false if it is not.
Parameters:
Source – the full pathname of the file to be copied file. This parameter
is required.
Note: Pathnames normally contain backslashes e.g. d:\welcome.txt, all
single backslashes should be entered as double backslashes i.e.
d:\\welcome.txt.
Destination – filename/path of the destination. This can be
• a simple filename - to make a copy of the source file in the same
directory.
• a full path with no filename - to copy the file with the same name
to another directory.
• a full path with filename - to copy the file to another directory
with a new name.


Can anyone give example for the three kinds of Destination


For this message opuslover has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: June 10th, 2007, 9:30 pm 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
Code:
CopyFile( "C:\\Test.txt", "Test2.txt" );

CopyFile( "C:\\Test.txt", "C:\\TestDir\\" );

MY_VAR = "C:\\Test3.txt";
CopyFile( "C:\\Test.txt", MY_VAR );


The use of a variable in the last case is just as an example; it could just be the string as the previous examples.

_________________
ddww Opus Developer


For this message Duncan Lilly has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: June 11th, 2007, 3:38 am 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
Thanks Duncan

But I still can't get how to save the destination in a variable.
What I want to do exactly is:
I want the user to use his own images and store them in a folder in the publication.I can do all these ,but the problem which i get that the Write to text save the source image path not the destination one.I really tried hard to find a soloution,but I can't .
Any help will be appreciated.


For this message opuslover has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: June 11th, 2007, 7:10 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Morning OpusLover,

Here's a very simply IMP that show the copyfile command in use.

Mack


You do not have the required permissions to view the files attached to this post.

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: June 11th, 2007, 9:40 am 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
Thank you Mac I really was waiting for your answer.
But in this case the user should do two things and I want the user to be happy and do only one action.
Anyway I found the solution.I really tried hard.

Again Great thanks for your efforts.


For this message opuslover has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group