Finding Youngest File in Intranet Folder

R

Rosa

Hello Everybody,
Is there a class equivalent to DirectoryInfo and FileInfo where I can
pass a http:// URL instead of a network path in order to find the
youngest file within an Intranet Folder.

I'm using this for FileShares:
DirectoryInfo di = new DirectoryInfo(strURL);
FileInfo[] fileList = di.GetFiles(strPattern);
and then I compare the LastWriteTime of all the files in the array.

But strURL only accepts \\server\folder paths and not
http://WebName/folder

Thanks in advance
Rosa
 
N

Nicholas Paldino [.NET/C# MVP]

Rosa,

There is nothing in the framework which does that. You will have to
perform the processing yourself or find a third party component that will do
it for you.

Hope this helps.
 
R

Rosa

Thanks Nicholas,
I will just try to access the \\server\c$\wwwroot\... and do it that way.
Cheers
Rosa

Nicholas Paldino said:
Rosa,

There is nothing in the framework which does that. You will have to
perform the processing yourself or find a third party component that will do
it for you.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Rosa said:
Hello Everybody,
Is there a class equivalent to DirectoryInfo and FileInfo where I can
pass a http:// URL instead of a network path in order to find the
youngest file within an Intranet Folder.

I'm using this for FileShares:
DirectoryInfo di = new DirectoryInfo(strURL);
FileInfo[] fileList = di.GetFiles(strPattern);
and then I compare the LastWriteTime of all the files in the array.

But strURL only accepts \\server\folder paths and not
http://WebName/folder

Thanks in advance
Rosa
 

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