文件类型.pl关联并使用cmd.exe运行脚本 [英] File Type .pl Association and Using cmd.exe to Run the Script
问题描述
我创建了一个新的文件类型.pl(Explorer->工具 - >文件夹选项...->文件类型)。现在我想做一个新的Action,将调用cmd.exe并自动运行PERL脚本。我不知道在应用程序用于执行操作下写什么,我必须传递cmd.exe某些参数,但我不'知道哪个。
参数形式应该是:[cmd.exe]< em文件位置 perl < 文件名 >
I've made a new file type .pl (Explorer->Tools->Folder Options...->File Types). Now I wanted to make a new Action which will call cmd.exe and automatically run PERL script.I don't know what to write under "Applications used to perform action" ,I have to pass cmd.exe certain arguments but I don't know which. Form of arguments should ,I suppose, be:[cmd.exe] <file location> perl <file name>
推荐答案
将 *。pl
与 perl.exe
,在命令提示符下键入以下内容。
To permanently associate *.pl
with perl.exe
, at a command prompt type the following.
assoc .pl=PerlScript
ftype PerlScript=c:\perl\bin\perl.exe %1 %*
请注意,您也可以将 *。pl
与 wperl.exe
相关联,可见命令窗口。 wperl.exe
是 ActiveState perl发布的一部分。
Note that you could also associate *.pl
with wperl.exe
, which will run the script without a visible command window. wperl.exe
is part of the ActiveState perl distribution.
这篇关于文件类型.pl关联并使用cmd.exe运行脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!