Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 6:16 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: checking if this file is in the directory or not
PostPosted: November 6th, 2009, 7:44 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
Hi All

I have put a variable to the filename of the image <img1>
then in script
by using
img1 = SYSTEM_PUBLICATION_DIR + "\\images\h\mypic.jpg"

I want to check wether the file is there in the directory or not?

_________________
Win windows 7
Opus Pro 9.5


Top
 Profile  
 
 Post subject:
PostPosted: November 6th, 2009, 8:06 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Use FileExists function.

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:
PostPosted: November 6th, 2009, 8:17 pm 
Offline

Joined: September 11th, 2006, 2:38 pm
Posts: 125
Thanks Mackavi
Always the first one to give me the solution since 2006

_________________
Win windows 7
Opus Pro 9.5


Top
 Profile  
 
 Post subject:
PostPosted: November 6th, 2009, 9:41 pm 
Offline

Joined: March 4th, 2007, 7:17 pm
Posts: 132
Is there a way to count the number of files in the directory?
Can I transfer the filenames in an array?
Most likely the answer to my question would be "no", but...

_________________
Opus Pro 5.5
Win XP


Top
 Profile  
 
 Post subject:
PostPosted: November 6th, 2009, 10:12 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Actually the answer is yes.

For Opus 6+ user, Interaktiv have a DLL that will do this.

For those pre-Opus 6, you need to use the command line to list the directory to file and read this into Opus.

EG:

dir > c:\listing.txt

There is a good post on this somewhere on the forum.

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:
PostPosted: November 6th, 2009, 10:58 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
There is a good post on this somewhere on the forum

There ARE a few other posts... here is one.
viewtopic.php?t=1399&highlight=listing+directory

_________________
_good things come to those who wait(0)_


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: No registered users and 17 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