我有这行代码:
@echo off
rem set the path to the Spek executable
set spek=C:\Program Files (x86)\Spek\spek.exe
rem set the path to the audio files
set audio_path=P:\Muzyka\complete\Album
rem loop through all audio files in the specified directory
for %%a in (%audio_path%\*.mp3) do (
rem open the audio file in a new Spek window
start "" %spek% "%%a"
)
我想打开该文件夹中的两首歌曲,为什么不行?
答案1
您应该spek
用双引号分隔变量的值,因为路径中包含空格:
set spek="C:\Program Files (x86)\Spek\spek.exe"
我修改后测试了.bat文件,它可以工作了!