PC Review


Reply
Thread Tools Rate Thread

Does file name contain the characters XYZ

 
 
Ed Peters
Guest
Posts: n/a
 
      10th Sep 2007
Hi,

I'm trying to find out if a folder contains any files .

The name of the file varies but always contains _XYZ_

How would I find out if there is a file ?

I can do a file that I know the name of :

eg

If dir("\test.xls") = "" then
exit
else
end if

I think the answer is very simple but can't see it at the mo!

Thanks,

Ed

 
Reply With Quote
 
 
 
 
JW
Guest
Posts: n/a
 
      10th Sep 2007
Sub Here()
If Dir("\*" & "_XYZ_" & "*.xls") = "" Then
MsgBox "nope"
Else
MsgBox "yup"
End If
End Sub

Ed Peters wrote:
> Hi,
>
> I'm trying to find out if a folder contains any files .
>
> The name of the file varies but always contains _XYZ_
>
> How would I find out if there is a file ?
>
> I can do a file that I know the name of :
>
> eg
>
> If dir("\test.xls") = "" then
> exit
> else
> end if
>
> I think the answer is very simple but can't see it at the mo!
>
> Thanks,
>
> Ed


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting unicode characters to a file (at this point I dont carewhat type of file) JimmyKoolPantz Microsoft VB .NET 2 22nd Jul 2008 08:06 PM
trying to export .aba file from Palm Desktop to .csv file and havingproblems with irregular characters Joe Microsoft Outlook 1 4th May 2008 04:18 PM
In file parsing, taking the first few characters of a text file after a readfile or streamreader file read... .Net Sports Microsoft ASP .NET 11 17th Jan 2006 12:44 AM
Write to new Binary File has junk characters at end of file not aaron Microsoft VB .NET 2 24th Mar 2005 05:00 PM
Strange characters displayed in file name - File Download Dialog - IE Daniel Cardoso Microsoft ASP .NET 1 24th Sep 2004 06:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:03 AM.