Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everyone,

I am doing a project in Windows CE using VB.net. I want to select a file from Mobile device which STARTS with QPOI and ENDS with .CSV

For this i am trying to write this below mentioned code, but it seems to be incorrect.
chcksite = "QPOI" & * & ".CSV"
If File.Exists("\Application\" & chcksite) Then

Can anyone help me.
Thanks in advance.
Posted
Updated 28-Mar-11 1:48am
v2

1 solution

Use GetFiles
VB
Dim di As New DirectoryInfo("c:\") 'or whatever
di.GetFiles("QPOI*.CSV", SearchOption.AllDirectories) 'or SearchOption.TopDirectoryOnly, if you don't want nested search
 
Share this answer
 
v2
Comments
Pravin Patil, Mumbai 28-Mar-11 8:17am    
Good answer....
Аslam Iqbal 28-Mar-11 9:40am    
very nice. my 5
Saumyavemula 29-Mar-11 1:29am    
Hi,

I want to find QPOI*.CSV file in mobile device i.e path("\Application\") not in system.
Prerak Patel 29-Mar-11 1:34am    
Then place your path instead of C:\
What is the problem?!
Saumyavemula 29-Mar-11 5:43am    
But SearchOption.AllDirectories is showing an error

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900