This commit is contained in:
xiang 2024-10-30 20:22:01 +08:00
parent 9a844c02b9
commit ffcfff68ec

View File

@ -52,8 +52,7 @@ namespace VideoConcat
private void Check_Folder()
{
Boolean hasHead;
Boolean hasTail;
string currentPath = Directory.GetCurrentDirectory();
DirectoryInfo? parentPathInfo = Directory.GetParent(currentPath);
if (parentPathInfo == null)
@ -61,9 +60,11 @@ namespace VideoConcat
WriteTxt("获取相关视频文件目录失败!");
return;
}
WriteTxt(parentPathInfo.FullName);
WriteTxt("当前目录为:" + parentPathInfo.FullName);
try
{
Boolean hasHead = false;
Boolean hasTail = false;
DirectoryInfo dirD = parentPathInfo as DirectoryInfo;
FileSystemInfo[] folders = dirD.GetDirectories();//获取文件夹下所有文件和文件夹
@ -82,10 +83,15 @@ namespace VideoConcat
hasTail = true;
}
}
//if (hasHead)
//{
// WriteTxt("存在head文件夹");
//}
if (!hasHead)
{
WriteTxt("存在名称为head的文件夹将作为视频开头");
}
if (!hasTail)
{
WriteTxt("存在名称为tail的文件夹将作为视频结尾");
}
}
catch (Exception ex)
{