I'm stuck with a search file problem.
I have a file say:
1346670589521421983450911196954093762922.nii
that is referenced to the file below:
1.3.46.670589.5.2.14.2198345091.1196954093.762922.dcm
The difference is that there are (.) placed in different positions. Does anybody know how to search for a file without the fullstop(.)? As i have to go through 300 directories all with diffrent file naming conventions i cannot just use substring to break them up. Thank you for all your help.
Cheers.
Just realised might be confusing what I described earlier.
In Summary I'm trying to use this string 1346670589521421983450911196954093762922 to look through a directory with hundreds of .dcms. That looks like 1.3.46.670589.5.2.14.2198345091.1196954093.762922.dcm. How can i search it based on 1346670589521421983450911196954093762922 string? Also the solution has to be on .net 3.5. Thank you.
So you want to ignore the dots and the extension of the file-name?
You could use
String.Replace
to remove the dots, a loop or LINQ query and thePath
-class: