Winzip命令行加载项 [英] Winzip command line add-in

查看:54
本文介绍了Winzip命令行加载项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何使用Winzip命令行加载项的经验?


我无法通过文件名中的空格创建zip文件。


使用:


RetValue = Shell(" C:\ winzip \ wzzip.exe C:\ MyFolder \ Myy Zi​​pFile .Zip

C:\ MyYtherFolder \ MyFile.mdb")

如果想要zipfile文件名中的空格,有什么语法?


谢谢!


史蒂夫

Is there anyone with experience using the Winzip command line add-in?

I can''t get it to create the zip file with a space in the file name.

Using:

RetValue = Shell("C:\winzip\wzzip.exe C:\MyFolder\My ZipFile.Zip
C:\MyOtherFolder\MyFile.mdb")

What is the syntax when you want a space in the zipfile file name?

Thanks!

Steve

推荐答案



用引号括起qoutes中的路径:

RetValue = Shell(" C:\ winzip \ wzzip.exe"&""" C: \ MyFolder \ Myy Zi​​pFile.Zip""&
Hi,
Enclose the path in qoutes in quotes:
RetValue = Shell("C:\winzip\wzzip.exe" & """C:\MyFolder\My ZipFile.Zip""" &
" C:\ MyyOtherFolder \ MyFile.mdb")


类似的东西。

我用Shell工作很多,我做的是将字符串构建为变量

而不是直接使用它在通话中。这样我可以在拨打电话之前看到我的字符串看起来是什么
。如果你不这样做,那就很容易让自己开车了。

疯狂试图找出正确的语法。

基本上,任何带空格的路径它必须用引号括起来,只需

就像从命令行提示符运行它一样。


-

HTH

Dan Artuso,Access MVP

" Steve" < SA **** @ penn.com>在消息新闻中写道:Jo ****************** @ newsread1.news.atl.earth link.net ...是否有任何使用Winzip命令行的经验添加 - 在?

我无法创建带有文件名空格的zip文件。

使用:

RetValue = Shell(C:\ winzip \ wzzip.exe C:\ MyFolder \ Myy Zi​​pFile.Zip
C:\ MyYtherFolder \ MyFile.mdb)

是否需要zipfile文件名中的空格?

谢谢!

史蒂夫
"C:\MyOtherFolder\MyFile.mdb")
something like that.
I work a lot with Shell and what i do is build the string into variable(s)
instead of putting it directly in the call. That way I can see what my string looks
before I make the call. If you don''t do this, it''s pretty easy to drive youself
crazy trying to figure out the correct syntax.
Basically, any path with spaces in it must be enclosed in quotes, just
like when you run it from the command line prompt.

--
HTH
Dan Artuso, Access MVP
"Steve" <sa****@penn.com> wrote in message news:Jo******************@newsread1.news.atl.earth link.net... Is there anyone with experience using the Winzip command line add-in?

I can''t get it to create the zip file with a space in the file name.

Using:

RetValue = Shell("C:\winzip\wzzip.exe C:\MyFolder\My ZipFile.Zip
C:\MyOtherFolder\MyFile.mdb")

What is the syntax when you want a space in the zipfile file name?

Thanks!

Steve



Dan,


感谢您的回复!


我认为您走在正确的轨道上 - 帮助我了解你所展示的内容

我。看起来你有一个双引号用双引号括起来在

开头和结尾的C:\ MyFolder \ Myy Zi​​pFile.Zip。那是对的吗?我将

解释为双引号括起来的字符串。对我来说,用双引号括起来的字符串

是:

"" C:\ MyFolder \ Myy Zi​​pFile.Zip""

我不明白这个,你能解释一下。


或者你遗漏了两个&符号并且意味着它是:

" "" &安培; C:\ MyFolder \我的ZipFile.Zip& """


感谢您的帮助!


Steve

" Dan Artuso" <哒***** @ NoSpampagepearls.com>在消息中写道

新闻:#C ************** @ TK2MSFTNGP12.phx.gbl ...
Dan,

Thank you for responding!

I think you''re on the right track - help me to understand what you have shown
me. It looks like you have a double quote enclosed by double quotes at the
beginning and end of C:\MyFolder\My ZipFile.Zip. Is that correct? I interpret
that then as a string enclosed by double quotes. To me then the string enclosed
by double quotes is:
""C:\MyFolder\My ZipFile.Zip""
I don''t understand this, can you explain.

Or did you leave out two ampersands and mean it to be:
""" & C:\MyFolder\My ZipFile.Zip & """

Thanks for the help!

Steve
"Dan Artuso" <da*****@NoSpampagepearls.com> wrote in message
news:#C**************@TK2MSFTNGP12.phx.gbl...

用引号括起qoutes中的路径:
RetValue = Shell(" C:\ winzip \ wzzip.exe"&"""" C:\ MyFolder \ Myy Zi​​pFile.Zip" ;""&
Hi,
Enclose the path in qoutes in quotes:
RetValue = Shell("C:\winzip\wzzip.exe" & """C:\MyFolder\My ZipFile.Zip""" &
" C:\ MyyOtherFolder \ MyFile.mdb")
类似的东西。
我和Shell一起工作了很多我do将字符串构建为变量
而不是直接将其放入调用中。这样我可以在拨打电话之前看到我的字符串
"C:\MyOtherFolder\MyFile.mdb")
something like that.
I work a lot with Shell and what i do is build the string into variable(s)
instead of putting it directly in the call. That way I can see what my string



。如果你不这样做,你很难自己疯狂地试图找出正确的语法。
基本上,任何带有空格的路径都必须用引号括起来,
就像你从命令行提示符运行它一样。

-
HTH
Dan Artuso,Access MVP

" Steve" ; < SA **** @ penn.com>在消息中写道


looks before I make the call. If you don''t do this, it''s pretty easy to drive youself crazy trying to figure out the correct syntax.
Basically, any path with spaces in it must be enclosed in quotes, just
like when you run it from the command line prompt.

--
HTH
Dan Artuso, Access MVP
"Steve" <sa****@penn.com> wrote in message



新闻:Jo ****************** @ newsread1.news.atl.earth link.net ...


news:Jo******************@newsread1.news.atl.earth link.net...

有没有人有使用Winzip命令行加载项的经验?

我无法创建zip文件使用:

RetValue = Shell(&C:\ winzip \ wzzip.exe C: ZipFile.Zip
C:\ MyYtherFolder \ MyFile.mdb")

当你想要zipfile文件名中的空格时有什么语法?

谢谢!

史蒂夫
Is there anyone with experience using the Winzip command line add-in?

I can''t get it to create the zip file with a space in the file name.

Using:

RetValue = Shell("C:\winzip\wzzip.exe C:\MyFolder\My ZipFile.Zip
C:\MyOtherFolder\MyFile.mdb")

What is the syntax when you want a space in the zipfile file name?

Thanks!

Steve




史蒂夫,

最简单的方法是以你知道它必须看起来的方式开始使用字符串

然后进行连接以使其成为现实。


任何带空格的路径都必须用引号括起来,所以如果你在命令提示符下键入

,你可以这样做:
Hi Steve,
The easiest way is to start out with the string the way you know it has to look
and then do the concatenation to make it so.

Any path with spaces has to be enclosed in quotes, so if you were to type
this in at the command prompt you would do this:
C:\ winzip \ wzzip.exe" C:\ MyFolder \ Myy Zi​​pFile.Zip" C:\ MyYtherFolder \ MyFile.mdb
(至少我很确定它会是什么。当我构建这些东西时,我总是让它工作

首先从命令提示符,我知道字符串必须是什么样的)


这是你想要的最终结果。

现在我建造这些东西的方式是一次一个部分。

对于上面我会有三个变量并将它们连接在一起。


cmdLine =" C:\ winzip \ wzzip.exe"

arg1 =""" C:\ MyFolder \ Myy Zi​​pFile.Zip"""

arg2 =" C:\ MyOtherFolder \ MyFile.mdb"


注意arg1两边有两个额外的引号。

按顺序要得到一个字面引用,你必须在你的

引用的字符串中放两个引号。

和..

finalArg = cmdLine& " " &安培; arg1 " &安培; arg2

Debug.Print finalArg


应显示:

C:\ winzip \ wzzip.exe" C :\ MyFolder \ Myy Zi​​pFile.Zip" C:\ MyYtherFolder \ MyFile.mdb

在即时窗口中


-

HTH

Dan Artuso,Access MVP

Steve < SA **** @ penn.com>在留言中写道:pH ****************** @ newsread1.news.atl.earth link.net ...丹,

谢谢回应!

我认为你走在正确的轨道上 - 帮助我了解你所展示的内容。看起来你在C:\ MyFolder \ Myy Zi​​pFile.Zip的开头和结尾用双引号括起来的双引号。那是对的吗?我将
解释为双引号括起来的字符串。对我来说,用双引号括起来的字符串是:
"" C:\ MyFolder \ Myy Zi​​pFile.Zip""
我不明白这个,可以你解释一下。

或者你遗漏了两个&符号并且意思是:
""" &安培; C:\ MyFolder \我的ZipFile.Zip& ""

感谢您的帮助!

史蒂夫

" Dan Artuso" <哒***** @ NoSpampagepearls.com>在消息中写道
新闻:#C ************** @ TK2MSFTNGP12.phx.gbl ...
C:\winzip\wzzip.exe "C:\MyFolder\My ZipFile.Zip" C:\MyOtherFolder\MyFile.mdb (at least I''m pretty sure that''s what it would be. when I build this stuff I always get it working
from the command prompt first, that way I know what the string has to look like)

and that''s the end result you want.
Now the way I build these things is one part at a time.
For the above I would have three variable and concatenate them together.

cmdLine = "C:\winzip\wzzip.exe"
arg1 = """C:\MyFolder\My ZipFile.Zip"""
arg2 = "C:\MyOtherFolder\MyFile.mdb"

notice there are two extra quotes on either side of arg1.
In order to get a literal quote you have to place two quotes in your
quoted string.
and..
finalArg = cmdLine & " " & arg1 " " & arg2
Debug.Print finalArg

which should show:
C:\winzip\wzzip.exe "C:\MyFolder\My ZipFile.Zip" C:\MyOtherFolder\MyFile.mdb
in the immediate window

--
HTH
Dan Artuso, Access MVP
"Steve" <sa****@penn.com> wrote in message news:pH******************@newsread1.news.atl.earth link.net... Dan,

Thank you for responding!

I think you''re on the right track - help me to understand what you have shown
me. It looks like you have a double quote enclosed by double quotes at the
beginning and end of C:\MyFolder\My ZipFile.Zip. Is that correct? I interpret
that then as a string enclosed by double quotes. To me then the string enclosed
by double quotes is:
""C:\MyFolder\My ZipFile.Zip""
I don''t understand this, can you explain.

Or did you leave out two ampersands and mean it to be:
""" & C:\MyFolder\My ZipFile.Zip & """

Thanks for the help!

Steve
"Dan Artuso" <da*****@NoSpampagepearls.com> wrote in message
news:#C**************@TK2MSFTNGP12.phx.gbl...

附上引号中qoutes中的路径:
RetValue = Shell(" C:\ winzip \ wzzip.exe"&"""" C:\ MyFolder \ MyMy ZipFile.Zip""" ;&
Hi,
Enclose the path in qoutes in quotes:
RetValue = Shell("C:\winzip\wzzip.exe" & """C:\MyFolder\My ZipFile.Zip""" &
" C:\ MyyOtherFolder \ MyFile.mdb")
"C:\MyOtherFolder\MyFile.mdb")


这样的事情。
我工作很多Shell和我所做的是将字符串构建为变量
而不是直接将其放入调用中。这样我可以在打电话之前看到我的字符串



something like that.
I work a lot with Shell and what i do is build the string into variable(s)
instead of putting it directly in the call. That way I can see what my string


看起来

。如果你不这样做,你很容易开车
before I make the call. If you don''t do this, it''s pretty easy to drive


你自己

疯狂试图找出正确的语法。
基本上,任何带有空格的路径必须用引号括起来,就像从命令行提示符运行它一样。

-
HTH
Dan Artuso,Access MVP

" Steve" < SA **** @ penn.com>在消息中写道
crazy trying to figure out the correct syntax.
Basically, any path with spaces in it must be enclosed in quotes, just
like when you run it from the command line prompt.

--
HTH
Dan Artuso, Access MVP
"Steve" <sa****@penn.com> wrote in message


新闻:Jo ****************** @ newsread1.news.atl.earth link.net ...


news:Jo******************@newsread1.news.atl.earth link.net...

有没有人有使用Winzip命令行加载项的经验?

我无法创建带有空格的zip文件使用:

RetValue = Shell(" C:\ winzip \ wzzip.exe C:\ MyFolder \ Myy Zi​​pFile.Zip < br:> C:\ MyYtherFolder \ MyFile.mdb")

当您想要zipfile文件名中的空格时,语法是什么?

谢谢!

史蒂夫
Is there anyone with experience using the Winzip command line add-in?

I can''t get it to create the zip file with a space in the file name.

Using:

RetValue = Shell("C:\winzip\wzzip.exe C:\MyFolder\My ZipFile.Zip
C:\MyOtherFolder\MyFile.mdb")

What is the syntax when you want a space in the zipfile file name?

Thanks!

Steve





这篇关于Winzip命令行加载项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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