SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
FileExists

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



Joined: 21 Jul 2006
Posts: 3

Post FileExists Reply with quote

two problem

first
if i use this function
FileExists( "c:\temp\a.a", found )
it gives to me always false.
in the directory the file exist i'm sure.

second
I want to control the first 8 characters of the name of the file, for knowing if the file exist.
how can i do?

example:
file name c:\temp\pippo084023072006.tmb
if the file pippo0840*.* exist i want that the script send me true on the variabile.

thank you so much

Luca

Thu Jul 27, 2006 6:59 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7970

Post Re: FileExists Reply with quote

1. You need to use double backslashes. Please see "Special ASCII characters" topic in the help for more info.
FileExists( "c:\\temp\\a.a", found )

2. FileExists( "c:\\temp\\pippo0840*.*", found )
or if you need to know the actual file name use
Dir("c:\\temp\\pippo0840*.*", name )
and then check the name value for an empty string. If it is empty, there is no such file, otherwise it will have the name of the found file.

: two problem

: first
: if i use this function
: FileExists( "c:\temp\a.a", found )
: it gives to me always false.
: in the directory the file exist i'm sure.

: second
: I want to control the first 8 characters of the name of the file, for knowing
: if the file exist.
: how can i do?

: example: file name c:\temp\pippo084023072006.tmb
: if the file pippo0840*.* exist i want that the script send me true on the
: variabile.

: thank you so much

: Luca

Thu Jul 27, 2006 8:56 am View user's profile Send private message
luca



Joined: 21 Jul 2006
Posts: 3

Post Re: FileExists Reply with quote

Thank you so much, troppo il migliore.

Thu Jul 27, 2006 10:16 am View user's profile Send private message
Robbert de GROOT



Joined: 13 Dec 2000
Posts: 53

Post Re: FileExists Reply with quote

: Thank you so much, troppo il migliore.
beware of hideing extensions if you are using Windwos.
I had the same problem untill I found out that
my windows was hiding the extensions

I thought I was dealing with a BB.xls file but afterall
it was BB.XLS.TXT .... Just check it
hope it helps

Mon Jul 31, 2006 7:07 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.