Get a folder name that contains and string and then open it?
This is the best i could do :
If fileName.Contains("hi")
But what i want to do it .
Open a folder : C:\Documents and Settings\5416339.5416339-PC\Application Data\ and navigate into a folder t开发者_如何学JAVAhat contains "hi" and then modify a file pref.js in it. (100% this file is in that folder and there is only one such folder)
Can you guys do this for me ?
Thanks..
Look at the Directory
and DirectoryInfo
classes.
Both have methods that will list the contained directories and files - this should give you enough to find a directory called hi
.
As for modifying the file, without knowing more about this file and how you want to modify it, I can't help.
精彩评论