1
0
mirror of synced 2025-01-19 01:14:08 +01:00

Create a folder for each sub archive within an archive when batch exporting

This commit is contained in:
KillzXGaming 2019-07-02 20:30:24 -04:00
parent 208f25408b
commit 5d6048f019
3 changed files with 5 additions and 1 deletions

Binary file not shown.

View File

@ -144,13 +144,17 @@ namespace FirstPlugin
{
if (FileFormat is SARC)
{
string ArchiveFilePath = Path.Combine(Folder, Path.GetFileNameWithoutExtension(FileFormat.FileName));
if (!Directory.Exists(ArchiveFilePath))
Directory.CreateDirectory(ArchiveFilePath);
foreach (var file in ((SARC)FileFormat).Files)
{
var archiveFile = STFileLoader.OpenFileFormat(file.FileName, new Type[] { typeof(BNTX), typeof(BFRES), typeof(PTCL), typeof(SARC) }, file.FileData);
if (archiveFile == null)
continue;
SearchBinary(archiveFile, Folder, Extension);
SearchBinary(archiveFile, ArchiveFilePath, Extension);
}
}
if (FileFormat is BNTX)