我应该如何从CMD中执行的命令创建批处理文件(.bat)

时间:2017-03-27 20:51:00

标签: windows batch-file cmd

下面的命令在命令提示符下工作正常但我在创建.bat文件时遇到困难,以便我可以安排它。请帮忙。

E:\ExportPackage.exe -profile  "SASAdmin" -package \Promotion_package_from_PROD\Package_1" -objects  "/Shared Data" -since "Week to date" -modified -subprop

1 个答案:

答案 0 :(得分:0)

要在命令提示符中创建批处理文件,只需echo将其设置为.bat文件即可。例如,在命令提示符下输入:

(echo @echo off&echo E:\ExportPackage.exe -profile  "SASAdmin" -package \Promotion_package_from_PROD\Package_1" -objects  "/Shared Data" -since "Week to date" -modified -subprop&pause) > test.bat

<强> test.bat的:

@echo off
E:\ExportPackage.exe -profile  "SASAdmin" -package \Promotion_package_from_PROD\Package_1" -objects  "/Shared Data" -since "Week to date" -modified -subprop
pause