By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,030 Members | 1,323 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,030 IT Pros & Developers. It's quick & easy.

How do I find files with the same extension

P: n/a
Hi, I need to find a file or files with extention *.PUL in a particular
directory and get the newest one (newest creation date).

I belive some one must have done this before.
Please help!

Thanks!
Greg

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"greg chu" <gr******@wendys.com> schrieb:
Hi, I need to find a file or files with extention *.PUL in a particular
directory and get the newest one (newest creation date).


\\\
Imports System.IO
..
..
..
Const PulExtension As String = "*.pul"
Dim FileNames() As String = _
Directory.GetFiles("C:\test", PulExtension)
///

More evolved recursive and threaded file enumeration:

<URL:http://dotnet.mvps.org/dotnet/samples/filesystem/FileSystemEnumerator.zip>

Sorting the files by date:

<URL:http://groups.google.es/groups?selm=OrzSfMuNFHA.3220%40TK2MSFTNGP14.phx.gb l>

(The reason why I am linking to google.es is that this is one of the few
Google Groups Web interfaces which have not yet been replaced by the
crippled and dysfunctional new version of the Web interface.)

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.