배치 파일로 .exe 프로그램의 여러 인스턴스를 열 수 없습니다.

배치 파일로 .exe 프로그램의 여러 인스턴스를 열 수 없습니다.

다음 코드 줄이 있습니다.

@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"
)

그리고 해당 폴더에 있는 2곡을 열고 싶은데 왜 작동하지 않나요?

답변1

spek경로에 공백이 있으므로 변수 값을 큰따옴표로 구분해야 합니다 .

 set spek="C:\Program Files (x86)\Spek\spek.exe"

수정 후 .bat 파일을 테스트했는데 작동합니다!

관련 정보