Colleagues,
Let's say you have a list of prefixes/IDs/whatever that are part of a file name, specifically - 1st two characters.
You go through the files' names in a dir and, depending on that 2-char prefix, rename this file.
Say, prefix may be "AB", "CD", "EF", "GH", but you're interested only in "CD" and "GH".
If it was up to me, I'd do the checking something like this:
However, I have no such luxury like adding my own code into the existing one (takes too long to explain the reasons).
I doubt that
would work...
... or it would?
Please advise!
Tnx!
Regards,
Ilya
Let's say you have a list of prefixes/IDs/whatever that are part of a file name, specifically - 1st two characters.
You go through the files' names in a dir and, depending on that 2-char prefix, rename this file.
Say, prefix may be "AB", "CD", "EF", "GH", but you're interested only in "CD" and "GH".
If it was up to me, I'd do the checking something like this:
Code:
Dim cStr As String, cFPref As String
cStr = "CD GH"
cFPref = Mid(cJustFileName, 1, 2)
If cStr.Contains(cFPref) Then
cFileName ' etc.
I doubt that
Code:
String("CD GH").Contains(cFPref)
... or it would?
Please advise!
Tnx!
Regards,
Ilya