基本批处理文件脚本问题 [英] Basic Batch File Scripting Question

查看:92
本文介绍了基本批处理文件脚本问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试做最简单的事情,但我正在从头开始学习脚本,并且什么都不知道。我有一个很大的批处理文件,我试图从另一个批处理文件。在第二个批处理文件中,它会打开带有一些文本的记事本文件。
我无法获取我的脚本以保持此文件处于打开状态并返回第一个批处理文件以继续。我无法将代码提供给第一批文件,但我可以将代码添加到我的添加内容中:

I am trying to do the most simple of things but am learning scripting from scratch and don't know really anything. I have a big batch file that I am trying to call another batch file from. In the second batch file, it opens up a notepad file with some text. I cannot get my script to keep this file open and return to the first batch file to continue. I cannot give the code to the first batch file, but I can give the code to my additions:

从第一批文件调用:

调用C:\ Users \SWDL_OPTICAL_STATION \Desktop\SWDL_OPTICAL_BURN \Disks_Needed.bat

call C:\Users\SWDL_OPTICAL_STATION\Desktop\SWDL_OPTICAL_BURN\Disks_Needed.bat

第二批文件:

:DISKS_NEEDED
  REM打开记事本文件以提醒操作员需要多少个磁盘

  ECHO DISKS NEEDED> Disks_Needed.txt

  ECHO。%DISK_QTY%>> Disks_Needed.txt

 记事本Disks_Needed.txt

:DISKS_NEEDED
  REM Open notepad file to remind operator of how many disks needed
  ECHO DISKS NEEDED >Disks_Needed.txt
  ECHO.%DISK_QTY% >>Disks_Needed.txt
  Notepad Disks_Needed.txt

目前,脚本将显示具有正确信息的预期记事本文件;但是,它不会让我继续使用第一个脚本。如果我尝试关闭记事本文件,它会关闭整个脚本。帮助!!

Currently, the script will display the intended notepad file with the correct information; however, it will not let me move on with the first script. If I try to close the notepad file, it closes the entire script. Help!!

推荐答案

两个选项:

start C:\Users\SWDL_OPTICAL_STATION\Desktop\SWDL_OPTICAL_BURN\Disks_Needed.bat

start notepad disks_needed.txt


这篇关于基本批处理文件脚本问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆