Krazitchek,
To borrow gani's code:
foreach(string sFile in System.IO.Directory.GetFiles(@"e:\test\", "*.lnk"))
{
System.IO.File.Delete(sFile);
}
The Directory.GetFiles function returns a string array of all the files in a
folder, the method is overloaded for an optional pattern.
As far as I can tell the array always includes the path passed to GetFiles.
Hope this helps
Jay
"Krazitchek" <kr********@hotmail.com> wrote in message
news:02****************************@phx.gbl...
Hi, how do i do to delete files with a specific extension
(like *.lnk).
I try File.Delete(@"e:\test\\*.lnk) but it does not work,
not the good way i guess...
Help please, thanks.