|
|
@@ -380,32 +380,41 @@ namespace UAS_MES_NEW.Make
|
|
|
string ok = Path.Combine(file, "OK");
|
|
|
string ng = Path.Combine(file, "NG");
|
|
|
string na = Path.Combine(file, "NA");
|
|
|
- string[] okPath = Directory.GetDirectories(ok);
|
|
|
- string[] ngPath = Directory.GetDirectories(ng);
|
|
|
- string[] naPath = Directory.GetDirectories(na);
|
|
|
|
|
|
List<string> pathList = new List<string> { };
|
|
|
- if(okPath.Length > 0)
|
|
|
+ if (Directory.Exists(ok))
|
|
|
{
|
|
|
- foreach(string item in okPath)
|
|
|
+ string[] okPath = Directory.GetDirectories(ok);
|
|
|
+ if (okPath.Length > 0)
|
|
|
{
|
|
|
- pathList.Add(item);
|
|
|
+ foreach (string item in okPath)
|
|
|
+ {
|
|
|
+ pathList.Add(item);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- if(ngPath.Length > 0)
|
|
|
+
|
|
|
+ if (Directory.Exists(ng))
|
|
|
{
|
|
|
- foreach (string item in ngPath)
|
|
|
+ string[] ngPath = Directory.GetDirectories(ng);
|
|
|
+ if (ngPath.Length > 0)
|
|
|
{
|
|
|
- pathList.Add(item);
|
|
|
+ foreach (string item in ngPath)
|
|
|
+ {
|
|
|
+ pathList.Add(item);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (naPath.Length > 0)
|
|
|
+ if (Directory.Exists(na))
|
|
|
{
|
|
|
- foreach (string item in naPath)
|
|
|
+ string[] naPath = Directory.GetDirectories(na);
|
|
|
+ if (naPath.Length > 0)
|
|
|
{
|
|
|
- pathList.Add(item);
|
|
|
+ foreach (string item in naPath)
|
|
|
+ {
|
|
|
+ pathList.Add(item);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -438,7 +447,6 @@ namespace UAS_MES_NEW.Make
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
string newFloderName = Path.GetDirectoryName(file);
|
|
|
Directory.Move(file, Path.Combine(newFloderName, "Log_" + Path.GetFileName(file)));
|
|
|
}
|