| 1. |
Solve : %1 is carried over to other batch file? |
|
Answer» For some reason, when I run one batch file, with a path as %1, for some reason when the second batch file is run by: ... and finally, how do you call this first batch? From the command line? And how does the mysterious %1 parameter get created? Is that typed after the batch name?GUI, drag a music file onto the first batch file.Why don't you just do this? set pth="%~dp1" Quote from: Salmon Trout on February 21, 2010, 09:03:45 AM Why don't you just do this?I did that at one point in time...I just can't quite remember why I changed it...anyway, did you figure out why controller.bat is crashing? Quote from: Helpmeh on February 21, 2010, 09:06:06 AM I did that at one point in time...I just can't quite remember why I changed it...anyway, did you figure out why controller.bat is crashing? Not yet. But I wonder why you are doing this Code: [Select]start cmd.exe /k "%cd%\controller.bat" specifically why you are using %cd%\ ? (%cd% is the current directory and if controller.bat is in the current directory you can use just its name) Try Code: [Select]start "" "cmd /k controller.bat" Make the alterations I have suggested & report back 'controller.bat" ' is not recognized as a ... you know the rest. Quote from: Helpmeh on February 21, 2010, 09:20:35 AM 'controller.bat" ' is not recognized as a ... you know the rest. is controller.bat in the same folder? Yes. The first file is called random_music.bat and the second is controller.bat . They are both in the same folder.doesn't start "" "controller.bat" WORK? This time, instead of getting a cmd.exe error message, I get the "Windows can not find 'controller.bat'. Make sure you typed the name correctly, and then try again. To search for a file, click the start button, and then click search." I changed it to "%cd%\controller.bat" and it still can't find it. I copied controller.bat and renamed the new VERSION 123.bat and it still can't find it. |
|