Cfexecute 7zip写入日志文件

时间:2016-09-08 12:53:40

标签: command-line coldfusion-9 7zip

我正在通过cfexecute执行7zip。我已在cf框中的命令提示符中测试了该命令。在命令提示符中,我把:

C:\apps\7-Zip\7z.exe e \\eisdevl.nas.gatech.edu\coldfusion\devl\cfapps\cfeis\distapps\20160810_GTECHREC_000085597_001.zip  -o\\eisdevl.nas.gatech.edu\coldfusion\devl\cfapps\cfeis\distapps\unzip -bsp1 > \\eisdevl.nas.gatech.edu\coldfusion\devl\cfapps\cfeis\distapps\unzip\log.txt

正确解压缩文件并将log.txt写入同一文件夹。

我可以使用cfexecute正确地解压缩,但是当我添加用于写入日志文件的行时,没有任何反应(解压缩或日志)。我试过了:

<cfexecute name="C:\apps\7-Zip\7z.exe" arguments="e \\eisdevl.nas.gatech.edu\coldfusion\devl\cfapps\cfeis\distapps\20160810_GTECHREC_000085597_001.zip  -o\\eisdevl.nas.gatech.edu\coldfusion\devl\cfapps\cfeis\distapps\unzip -bsp1 > \\eisdevl.nas.gatech.edu\coldfusion\devl\cfapps\cfeis\distapps\unzip\log.txt">

<cfexecute name="C:\Windows\System32\cmd.exe" arguments="C:\apps\7-Zip\7z.exe e \\eisdevl.nas.gatech.edu\coldfusion\devl\cfapps\cfeis\distapps\20160810_GTECHREC_000085597_001.zip  -o\\eisdevl.nas.gatech.edu\coldfusion\devl\cfapps\cfeis\distapps\unzip -bsp1 > \\eisdevl.nas.gatech.edu\coldfusion\devl\cfapps\cfeis\distapps\unzip\log.txt">

以上的许多其他变体。有人能告诉我我做错了吗?

感谢。

2 个答案:

答案 0 :(得分:1)

您可以尝试设置>参数,而不是使用outputFile生成日志文件吗?

答案 1 :(得分:0)

outputfile参数似乎是在添加&#34; -bso1&gt; C:\徘徊无论\ mylogfile.txt&#34;到你的命令结束

我也没能做-bso1,它仍然在某些地方工作,但在我开始添加过滤器之前它仍然在一些场景中起作用