Need to check whether a file named flower exists with different extensions

P

Ponnurangam

Hi,

I need to check whether a file named flower exists with different
extensions.

I know only file name. I don't the the extension(may be .bmp, .ipg, or
..gif).

And if there are files with different extensions, I need to get their name
with extensions and copy them to a folder.

Thanks and Regards

Ponnurangam
 
C

Chris Dunaway

I need to check whether a file named flower exists with different
extensions.

Look at the System.IO namespace. In particular the Directory.Getfiles
method.

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 
P

Ponnurangam

Dim st() As String = System.IO.Directory.GetFiles("c:\", "flower.*")

st has the different extension file names of flower

Thanks a lot Chris

Ponnurangam

Chris Dunaway said:
I need to check whether a file named flower exists with different
extensions.

Look at the System.IO namespace. In particular the Directory.Getfiles
method.

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top