You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何修改批处理脚本让QuickBMS将ACD文件提取至其所在文件夹

Fix: Extract ACD Files to Their Own Folder's data Directory

The issue with your original script is that the "\data" path is relative to where you run the batch file, not the location of each .acd file. To fix this, we need to dynamically reference the parent folder of each .acd file using batch variable expansion.

Here's the modified script that will extract each .acd file to a data folder in its own directory:

for /R %%f in (*.acd) do (
    # Create the data folder if it doesn't exist (prevents QuickBMS errors)
    if not exist "%%~dpf\data" mkdir "%%~dpf\data"
    # Run QuickBMS with the dynamic output path
    quickbms.exe D:\assetto_corsa_acd.bms %%f "%%~dpf\data"
)

Key Changes Explained:

  • %%~dpf is a batch variable expansion that returns the full drive and path of the current .acd file (e.g., if %%f is X:\carname\data.acd, %%~dpf becomes X:\carname\).
  • By replacing the fixed "\data" with "%%~dpf\data", we tell QuickBMS to output files to a data folder directly in the same directory as the .acd file being processed.
  • The mkdir command ensures the target data folder exists before extraction—this avoids QuickBMS failing if the folder hasn't been created yet.

Since you've added QuickBMS to your system PATH, we can use just quickbms.exe instead of the full path, which keeps the script cleaner.

内容的提问来源于stack exchange,提问作者Jelle Volkerink

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 06:39:19