Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 4:42 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Copy File action-Opus Professional 9 (EXE export)
PostPosted: June 3rd, 2014, 4:04 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi,

I've been trying to use the copy file action in an Opus Professional v9 (export to EXE) pub without success. (Need to copy several, maybe up to 80 PNG files from one directory to another, within the pub directory.)

The script action using SYSTEM_PUBLICATION_DIR, an image folder and a wildcard (for PNG's) doesn't work for me:

Code:
CopyFile( SYSTEM_PUBLICATION_DIR + "\\images5\\*.png", SYSTEM_PUBLICATION_DIR + "\\images2" )


I've also tried the standard action "Copy File" with the pathnames (SYSTEM_PUBLICATION_DIR\images5\*.png, SYSTEM_PUBLICATION_DIR\images2), which doesn't work. Tried single\, double \\ and forward slashes / and //, without success.

As a test, can't even get a single (named) PNG file to copy over.

Not sure what I am doing wrong?

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Copy File action-Opus Professional 9 (EXE export)
PostPosted: June 3rd, 2014, 4:26 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
You have to specify the file name for both the copy from and copy to.

Mack

_________________
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: Re: Copy File action-Opus Professional 9 (EXE export)
PostPosted: June 3rd, 2014, 4:32 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

Thank you for your suggestion.

If I use a single file, specifying its file name (for example, full.png), it copies over. But when I try a wildcard and PNG in both to and from, but no specific file name, still doesn't work (neither for scripted nor standard actions). I've got a lot of files to copy over. Would not want to use 80 separate actions. Since file names are user choice, created in a C# utility app, no easy way to iterate through the names, log them.

Looks like wildcards are the problem.

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Copy File action-Opus Professional 9 (EXE export)
PostPosted: June 3rd, 2014, 4:45 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
No you can't use a wild card - you must give a file name.

If you have a lot of files, you need some way of reading this into a list for iterating and then replace the file name with a variable - like such:

Code:
var n = "1.png";
CopyFile(SYSTEM_PUBLICATION_DIR+"\\"+n, SYSTEM_PUBLICATION_DIR+"\\Temp\\" );


Mack

_________________
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: Re: Copy File action-Opus Professional 9 (EXE export)
PostPosted: June 3rd, 2014, 5:17 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Mack,

Thank you for this suggestion.

User sets file names, so may be challenging to figure out a way to read these into a list.

Even with your example, not sure my scripting is up to it.

But may be worth a try.

Alternative: Although initially not sure, my changed thinking is that I can probably build something into the C# utility app to do what is needed.

_________________
Stephen


For this message Stephen has been thanked by : mackavi


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 22 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