顺便说一句,这是使用宏命令的复杂方式。
这将为您提供“文档和设置”目录中“dir”的输出。
SYST:SHOR1:PATH“cmd.exe”syst:shor1:arg'/ c cd“c: documents and settings”&&
dir> c: out'SYST:SHOR1:EXEC MMEM:TRAN?
“c: out”第一个语句在位置1创建一个新宏(覆盖你在位置1中的任何宏),称为“cmd.exe”第二个语句,给出宏的参数 - 它将更改目录改为“
c: documents and settings“然后在该目录上调用”dir“。
操作的输出保存到文件C: out第三个语句执行宏第四个语句将“c: out”的内容传回给调用者。
以上来自于谷歌翻译
以下为原文
By the way, here's the convoluted way using the macro commands. This gives you the output of "dir" on the "documents and settings" directory.
SYST:SHOR1:PATH "cmd.exe"
syst:shor1:arg '/c cd "c:documents and settings" && dir > c:out'
SYST:SHOR1:EXEC
MMEM:TRAN? "c:out"
The 1st statement creates a new macro in position 1 (overwrites whatever macro you had in position 1) called "cmd.exe"
The 2nd statement, gives the arguments of the macro - which does a change directory to "c:documents and settings" and then calls "dir" on that directory. The output of the operation is saved to a file C:out
The third statement executes the macro
The fourth statement transfers the contents of "c:out" back to the caller.
顺便说一句,这是使用宏命令的复杂方式。
这将为您提供“文档和设置”目录中“dir”的输出。
SYST:SHOR1:PATH“cmd.exe”syst:shor1:arg'/ c cd“c: documents and settings”&&
dir> c: out'SYST:SHOR1:EXEC MMEM:TRAN?
“c: out”第一个语句在位置1创建一个新宏(覆盖你在位置1中的任何宏),称为“cmd.exe”第二个语句,给出宏的参数 - 它将更改目录改为“
c: documents and settings“然后在该目录上调用”dir“。
操作的输出保存到文件C: out第三个语句执行宏第四个语句将“c: out”的内容传回给调用者。
以上来自于谷歌翻译
以下为原文
By the way, here's the convoluted way using the macro commands. This gives you the output of "dir" on the "documents and settings" directory.
SYST:SHOR1:PATH "cmd.exe"
syst:shor1:arg '/c cd "c:documents and settings" && dir > c:out'
SYST:SHOR1:EXEC
MMEM:TRAN? "c:out"
The 1st statement creates a new macro in position 1 (overwrites whatever macro you had in position 1) called "cmd.exe"
The 2nd statement, gives the arguments of the macro - which does a change directory to "c:documents and settings" and then calls "dir" on that directory. The output of the operation is saved to a file C:out
The third statement executes the macro
The fourth statement transfers the contents of "c:out" back to the caller.
举报