Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string[] Filelist = Directory.GetFiles(this.XML_FPath_Textbox.Text.ToString());
- try
- {
- foreach (string file in Filelist)
- {
- Application.DoEvents();
- XmlDocument xmldoc = new XmlDocument();
- XmlNodeList xmlnode;
- FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read);
- xmldoc.Load(fs);
- xmlnode = xmldoc.GetElementsByTagName("Source");
- foreach (XmlNode n in xmlnode)
- {
- string token = n.InnerText.ToString().Replace(@"\\az77-fs1\epic_rel\", "");
- string Destination_File_Name = Path.GetFileName(token);
- string[] tokenaizer = token.ToString().Split('\\');
- if (Regex.IsMatch(token, "names.dat", RegexOptions.IgnoreCase))
- {
- using (StreamWriter sw = new StreamWriter("Analyzer.txt",true))
- {
- token = Regex.Replace(token, @"THIRD_PARTY\\", "", RegexOptions.IgnoreCase);
- token = Regex.Replace(token,@"platforms\\","",RegexOptions.IgnoreCase);
- token = Regex.Replace(token,@"productsoftware\\","",RegexOptions.IgnoreCase);
- sw.WriteLine(token.ToString());
- }
- }
- }
- }
- string[] lines = File.ReadAllLines(@"Analyzer.txt");
- lines = lines.GroupBy(x => x).Where(g => g.Count() > 1).Select(g => g.Key).ToArray();
- File.WriteAllLines(@"AnalyzerFINAL.txt", lines);
- Process.Start("notepad.exe", "AnalyzerFINAL.txt");
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message.ToString(), "Analyzer", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- }
Add Comment
Please, Sign In to add comment