Inital Commit

This commit is contained in:
Dan Dembinski
2020-05-07 10:34:18 -04:00
commit f8f21972f7
6 changed files with 531 additions and 0 deletions

47
orderRenamer/Program.cs Normal file
View File

@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
namespace orderRenamer
{
class Program
{
static string client;
static string jobNumber;
static string path;
static string ClientConfig = "\\\\aapp01\\c$\\Program Files (x86)\\AKSESS\\Storefront\\Order Delivery Service\\ClientConfig.xml";
static void Main(string[] args)
{
//Console.WriteLine("test");
client = "ADA";
// jobNumber = "123";
XmlDocument doc = new XmlDocument();
//try { doc.Load("\\\\aapp01\\c$\\Program Files (x86)\\AKSESS\\Storefront\\Order Delivery Service\\ClientConfig.xml"); }
try { doc.Load(ClientConfig); }
catch (System.IO.FileNotFoundException)
{
Console.WriteLine("Can't access");
}
XmlNodeList elemList = doc.GetElementsByTagName("Name");
for (int i = 0; i < elemList.Count; i++)
{
// Console.WriteLine(elemList[i].InnerXml);
if (elemList[i].InnerXml == client)
{
XmlNodeList elemPath = doc.GetElementsByTagName("DPCFolder");
path = elemPath[i].InnerXml;
Console.WriteLine(path);
break;
}
}
Console.WriteLine(path);
}
}
}