Colleagues,
Does the function in subject takes wildcards?
I have the code
and it never gets inside If - End If structure even though there are a slew of files in that lcSelectedDir.
I have found that Directory.GetFiles(String, String) can be used instead (tested, it worked.)
However, I also need somethihng like Delete(sPath & "*.*"), that is again: wild cards.
Apparently, File object cannot work with wildcards.
Additionally, Directory object has no Delete() method, and I need something like that.
I could've roll-er-own function, e.g. DeleteFiles(sPath & "*.*"), but I hope there is already such thing, and I wouldn't be "re-inventing the wheel".
Hence teh Q.:
Is there, in .NET, a function Delete() files that takes wildcards?
TIA!
Regards,
Ilya
Does the function in subject takes wildcards?
I have the code
Code:
If File.Exists(lcSelectedDir & "*.*") Then
' Some code
End If
and it never gets inside If - End If structure even though there are a slew of files in that lcSelectedDir.
I have found that Directory.GetFiles(String, String) can be used instead (tested, it worked.)
However, I also need somethihng like Delete(sPath & "*.*"), that is again: wild cards.
Apparently, File object cannot work with wildcards.
Additionally, Directory object has no Delete() method, and I need something like that.
I could've roll-er-own function, e.g. DeleteFiles(sPath & "*.*"), but I hope there is already such thing, and I wouldn't be "re-inventing the wheel".
Hence teh Q.:
Is there, in .NET, a function Delete() files that takes wildcards?
TIA!
Regards,
Ilya