Windows批处理文件中的打开文本文件和程序快捷方式 [英] Open text file and program shortcut in a Windows batch file

查看:95
本文介绍了Windows批处理文件中的打开文本文件和程序快捷方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要运行同一文件夹中的两个文件.一个是.txt文件,另一个是.exe的程序快捷方式.我想在同一位置制作一个批处理文件,以打开文本文件和快捷方式,然后关闭该批处理文件(但文本文件和程序保持打开状态).

I have two files in the same folder that I'd like to run. One is a .txt file, and the other is the program shortcut to an .exe. I'd like to make a batch file in the same location to open the text file and the shortcut then close the batch file (but the text file and program remain open).

我没有运气尝试过这个

open "myfile.txt"
open "myshortcut.lnk"

也没用:

start "myfile.txt"
start "myshortcut.lnk"

推荐答案

我能够找出解决方案:

start notepad "myfile.txt"
"myshortcut.lnk"
exit

这篇关于Windows批处理文件中的打开文本文件和程序快捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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