Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- objStartFolder = "D:\Games\DarkSoulsIII\Game\Data1" 'Path to execute stuff in, change to whatever
- binderToolPath = "D:\Games\DarkSoulsIII\Game\bindertool.exe"
- texConvPath = "D:\Games\DarkSoulsIII\Game\texconv.exe"
- Set objFSO = CreateObject("Scripting.FileSystemObject")
- Set objFolder = objFSO.GetFolder(objStartFolder)
- Set oShell = CreateObject ("WScript.Shell")
- Set objSuperFolder = objFSO.GetFolder(objStartFolder)
- '******** Start bindertool to extract all BND, comment/remove line if you don't want it
- Call ExtractBND (objSuperFolder)
- '******** Start bindertool to extract all TPF, comment/remove line if you don't want it
- Call ExtractTPF (objSuperFolder)
- '******** Start texconv to convert DDS to PNG, comment/remove line if you don't want it
- Call ConvertDDS (objSuperFolder)
- Sub ExtractBND(fFolder)
- Set objFolder = objFSO.GetFolder(fFolder.Path)
- Set colFiles = objFolder.Files
- For Each objFile in colFiles
- If UCase(objFSO.GetExtensionName(objFile.Name)) = "BND" Then
- runline = "cmd.exe /c " & binderToolPath & " " & objFile.Path
- wscript.echo runline
- oShell.run runline
- End if
- Next
- For Each Subfolder in fFolder.SubFolders
- ExtractTPF(Subfolder)
- Next
- End Sub
- Sub ExtractTPF(fFolder)
- Set objFolder = objFSO.GetFolder(fFolder.Path)
- Set colFiles = objFolder.Files
- For Each objFile in colFiles
- If UCase(objFSO.GetExtensionName(objFile.Name)) = "TPF" Then
- runline = "cmd.exe /c " & binderToolPath & " " & objFile.Path
- wscript.echo runline
- oShell.run runline
- End if
- Next
- For Each Subfolder in fFolder.SubFolders
- ExtractTPF(Subfolder)
- Next
- End Sub
- Sub ConvertDDS(fFolder)
- Set objFolder = objFSO.GetFolder(fFolder.Path)
- Set colFiles = objFolder.Files
- For Each objFile in colFiles
- If UCase(objFSO.GetExtensionName(objFile.Name)) = "DDS" Then
- runline = "cmd.exe /c " & texConvPath & " -ft PNG " & objFile.Path & " -o " & objFile.ParentFolder
- wscript.echo runline
- oShell.run runline
- End if
- Next
- For Each Subfolder in fFolder.SubFolders
- ConvertDDS(Subfolder)
- Next
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement