Inital Commit
This commit is contained in:
47
orderRenamer/Program.cs
Normal file
47
orderRenamer/Program.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user