@echo off
setlocal EnableDelayedExpansion

set "IDA_PATH=D:\IDA_Pro_v6.8\idaq.exe"
set "FOLDER_PATH=D:\bishe\Gencoding\train_malware"
set "SCRIPT_PATH=../raw-feature-extractor/preprocessing_ida.py"
set "SAVE_PATH=../train_malware_result/"

for %%f in ("%FOLDER_PATH%\*.*") do (
    echo %%f
    if /i "%%~xf"==".idb" (
        echo Found IDB file: %%f
    ) else (
        echo !time! %%f
        %IDA_PATH% -c -A -S"%SCRIPT_PATH% --path %SAVE_PATH%" %%f
    )
)

endlocal

