SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
FileFindFirst Does Not Work with *.*

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
FileFindFirst Does Not Work with *.*
Author Message
BillR69



Joined: 11 May 2007
Posts: 29
Country: United States

Post FileFindFirst Does Not Work with *.* Reply with quote
The code below works fine. file_name receives the name of the first file found that has an extension of .txt

Dim filepath string "C:\\testme\\*.txt"
Dim file_name string
Dim found boolean
Dim msg string
messagebox filepath
FileFindFirst filepath file_name found
Concatex found " " file_name msg
messagebox msg

However, change the first line to

Dim filepath string "C:\\testme\\*.*"

and found still returns True, but file_name is empty.

Is this a known bug? Or is there some other way to get FileFindFirst to work with total wildcard searches? I have 3.4.26 installed.
Fri May 11, 2007 12:00 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Reply with quote
Try dir *.* in DOS and you always get something even if the folder is empty. You actually get "." and ".."

Same thing is here. To remedy this, check if the returned value is empty. If yes, set found to FALSE

Hope this helps
Fri May 11, 2007 2:21 pm View user's profile Send private message
BillR69



Joined: 11 May 2007
Posts: 29
Country: United States

Post Reply with quote
Thanks. Just wondered if it was working correctly. I can check the results. That works fine.
Fri May 11, 2007 2:57 pm 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.