dtv
March 1st, 2006, 03:16 AM
I dont mind to have bugs depending on me. This can be fixed. The thing that i am very afraid is if I have to deal with framework bugs. These cannot be detected easily, causing headaches and a strange wish to suicide. In advance, there is always a code solution in any case.
DirectoryInfo.GetFiles (VS.NET PRO 2003 , framework 1.1, no updates)
----------------------------------------------------------------------------------------
Data:
many, many files on form "yymmddhhmmss.msg", for example "060214172835.msg".
imagine many msg files created on feb, 2006:
"0602xxxxxxxx.msg".
And some other created on march, 2006:
"0603xxxxxxxx.msg".
strFilter = "0602*.msg"
GetFiles(strFilter) returns correctly all msgs created on feb 2006.
strFilter = "0603*.msg"
GetFiles(strFilter) returns all msgs created on march 2006, PLUS TWO FILES CREATED ON FEB. That is completely out of logic! And applies only for two mysterious files created on feb. I dont get it.
The directory contains many "0603*.msg" and many "0602*.msg" files.
strFilter = "0603*.msg"
Line 1: Dim D As New IO.DirectoryInfo(msgPath)
Line 2: For Each F As IO.FileInfo In D.GetFiles(strFilter)
Line 3: If (Left(F.Name,4) = Left(strFilter,4)) Then
Line 4: <do stuff with files created on the specific year and month, as strFilter describes>
Line 5: End If
Line 6: Next
Lines 3 & 5 normally not needed, of course. "strFilter" insures that all the files assigned to F are for the specific year and month! But without these lines, as i am saying above, GetFiles returns these files also:
060214152727.msg
060214194019.msg
even if the strFilter was set to look for "0603*.msg" msgs !!!
The example wich i am referencing applies only for months 03 and 02. I didnt test it with other ones.
:eek:
DirectoryInfo.GetFiles (VS.NET PRO 2003 , framework 1.1, no updates)
----------------------------------------------------------------------------------------
Data:
many, many files on form "yymmddhhmmss.msg", for example "060214172835.msg".
imagine many msg files created on feb, 2006:
"0602xxxxxxxx.msg".
And some other created on march, 2006:
"0603xxxxxxxx.msg".
strFilter = "0602*.msg"
GetFiles(strFilter) returns correctly all msgs created on feb 2006.
strFilter = "0603*.msg"
GetFiles(strFilter) returns all msgs created on march 2006, PLUS TWO FILES CREATED ON FEB. That is completely out of logic! And applies only for two mysterious files created on feb. I dont get it.
The directory contains many "0603*.msg" and many "0602*.msg" files.
strFilter = "0603*.msg"
Line 1: Dim D As New IO.DirectoryInfo(msgPath)
Line 2: For Each F As IO.FileInfo In D.GetFiles(strFilter)
Line 3: If (Left(F.Name,4) = Left(strFilter,4)) Then
Line 4: <do stuff with files created on the specific year and month, as strFilter describes>
Line 5: End If
Line 6: Next
Lines 3 & 5 normally not needed, of course. "strFilter" insures that all the files assigned to F are for the specific year and month! But without these lines, as i am saying above, GetFiles returns these files also:
060214152727.msg
060214194019.msg
even if the strFilter was set to look for "0603*.msg" msgs !!!
The example wich i am referencing applies only for months 03 and 02. I didnt test it with other ones.
:eek: