Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently September 30th, 2024, 1:36 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: File exists
PostPosted: April 26th, 2005, 10:13 am 
Offline

Joined: November 3rd, 2004, 12:12 pm
Posts: 117
Location: France - Bretagne
Hi,

I have Opus pro04 evolution... Is it possible by scripting to verify if a file exist (I know that this function is include in Pro XE (FileExists), but at this time i have only the pro evolution version :))

Thank you
Benoit

_________________
Opus Pro 06, Win XP.


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 26th, 2005, 11:06 am 
Offline

Joined: October 25th, 2004, 12:27 pm
Posts: 526
Location: Digital Workshop
Hi,

Thank you for your enquiry.

As you correctly state, the FileExists() function is only available in Opus Pro XE 04.

One possible workaround would be to use an OpenFile() function in read only mode to open the file you wish to check, then check the contents of the object which stores the file connection. If this object contains data, the target file exists and you can apply the relevant actions. Otherwise, the file was not found.

The code should look something like the following:

Code:
file = OpenFile("C:\\Documents and Settings\\Username\\Desktop\\targetfile.txt",false,true)
if (file) {
   Debug.trace("File exists!")
} else {
   Debug.trace("File not found!")
}


I hope this helps. Please do not hesitate to contact me if you have any further queries.

Kind regards,

_________________
Robin Garrett
Digital Workshop Technical Support


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 26th, 2005, 12:52 pm 
Offline

Joined: November 3rd, 2004, 12:12 pm
Posts: 117
Location: France - Bretagne
that is ok


thank you
Benoit

_________________
Opus Pro 06, Win XP.


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

All times are UTC [ DST ]


Who is online

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