开发者

How do I run another command in a cmd batch file?

开发者 https://www.devze.com 2023-04-13 01:30 出处:网络
I have this command that i need to run cd /d C:\\leads\\ssh & C:\\Windows\\System32\\cmd.exe /E:ON /K C:\\Ru开发者_开发问答by192\\bin\\setrbvars.bat

I have this command that i need to run

cd /d C:\leads\ssh & C:\Windows\System32\cmd.exe /E:ON /K C:\Ru开发者_开发问答by192\bin\setrbvars.bat 

this opens the command prompt

but I need to run this command in the prompt

ruby C:\lead\leads.rb

which will fire off a script.....but i have no idea what to add to my bat file to do this

i tried the -f flag to tell it to run the command but no go....any ideas to what to do to make this run

cd /d C:\leads\ssh & C:\Windows\System32\cmd.exe /E:ON /K C:\Ruby192\bin\setrbvars.bat -f ruby C:\lead\leads.rb
pause


Try the following batch file:

@echo off
cd /d C:\leads\ssh 
call C:\Ruby192\bin\setrbvars.bat
ruby C:\lead\leads.rb
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号