SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
FileExists == NOT

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
FileExists == NOT
Author Message
Mark Richards



Joined: 05 Jun 2000
Posts: 31

Post FileExists == NOT Reply with quote

I cannot seem to get FileExists to work properly.

I want to check to see if any file/s appear in the directory:

f:\edi\inbound

My statement is

dim lReturn, boolean

FileExists "f:\edi\inbound\*.*", lReturn

In ALL cases, lReturn returns TRUE.

The directory i am checking is completely free of subdirectories, although I assume this should not matter.

Any suggestions?

Mark Richards
Boston


Wed Feb 28, 2001 1:03 pm View user's profile Send private message
Len Fromzel ( Soft Tree)



Joined: 28 Feb 2001
Posts: 2

Post Re: FileExists == NOT Reply with quote

Mark:

We'll look close on your comment in a short time.
First we'll check it in our enviroment.

It seems to me that this is arguably a problem, but rather an inconvenience.
Say, if you do a file search with a wildcard criteria reading:
filename.*
- you expect to get the list of all files with NO extension along with ANY extension... So * can represent NULL. This may result in an unexpected result you get with FileExists.

: I cannot seem to get FileExists to work properly.

: I want to check to see if any file/s appear in the directory: f:\edi\inbound

: My statement is

: dim lReturn, boolean

: FileExists "f:\edi\inbound\*.*", lReturn

: In ALL cases, lReturn returns TRUE.

: The directory i am checking is completely free of subdirectories, although I
: assume this should not matter.

: Any suggestions?

: Mark Richards
: Boston

Wed Feb 28, 2001 2:39 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: FileExists == NOT Reply with quote

If you "dir *.*" in DOS in an empty directory you get at least two lines of output: "." and ".." Same is true from FileExists. Using file mask like *.* with FileExists does not make sense.
Either use a more specif mask or use JAL Dir (NOT DOS DIR) statement to get the list of files and compare that list to an emty string. If the result if empty, there is no files.

Note that Dir statement does not return "." and ".." as opposite to DIR in DOS

: I cannot seem to get FileExists to work properly.

: I want to check to see if any file/s appear in the directory: f:\edi\inbound

: My statement is

: dim lReturn, boolean

: FileExists "f:\edi\inbound\*.*", lReturn

: In ALL cases, lReturn returns TRUE.

: The directory i am checking is completely free of subdirectories, although I
: assume this should not matter.

: Any suggestions?

: Mark Richards
: Boston

Thu Mar 01, 2001 10:29 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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 vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.