【发布时间】:2023-05-18 19:05:01
【问题描述】:
谁能告诉我为什么重定向到文件在我的 HTA 程序中不起作用?它包含以下内容:
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "md5sums.exe", "tarball.tar > .\md5sum.log", , , NORMAL_WINDOW
当我使用上面两行没有重定向运行我的 HTA 程序时,它工作正常。但是第二次我添加 "> .\md5sum.log",md5sums.exe 吐出以下错误:
Unable to read file/directory .\md5sum.log
,表示它忽略了重定向符号并尝试获取不存在的 md5sum.log 文件的校验和。
md5sums.exe 只是一个外部校验和程序。当我从命令行运行以下命令时,它工作正常:
md5sums.exe tarball.tar > .\md5sum.log
,按预期将 tarball.tar 的校验和传送到 md5sum.log 文件。
我在整个 Interwebs 中到处搜索,但没有找到解决方案。任何人都可以提供任何帮助,我将不胜感激。
【问题讨论】: