#关闭命令显示 @echo off #提示信息 echo Now,listing the controller,please not shutdown the DOS File! #切换到当前路径,.bat文件和.rb文件放在一起就可以了 set pa=%cd% #执行ruby脚本 ruby test.rb pause
本文介绍了一种在DOS环境下执行Ruby脚本的方法,通过设置路径并使用批处理命令调用Ruby解释器运行.rb文件,适用于需要在命令行环境中进行自动化任务的场景。
#关闭命令显示 @echo off #提示信息 echo Now,listing the controller,please not shutdown the DOS File! #切换到当前路径,.bat文件和.rb文件放在一起就可以了 set pa=%cd% #执行ruby脚本 ruby test.rb pause
转载于:https://www.cnblogs.com/smiler/p/3166747.html

被折叠的 条评论
为什么被折叠?