By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,694 Members | 2,121 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,694 IT Pros & Developers. It's quick & easy.

ASP run command line

P: n/a
What is the proper syntax to run this command line in ASP?

wzzip.exe File.zip File.txt

thanks
Jan 6 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Dim oShell, sCommand
sCommand = "wzzip.exe C:\Output\File.zip C:\SourceFiles\File.txt"
Set oShell = Server.CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing

Try that.

Ray at work

"shank" <sh***@tampabay.rr.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
What is the proper syntax to run this command line in ASP?

wzzip.exe File.zip File.txt

thanks

Jan 6 '06 #2

P: n/a
I'm not sure if this is a syntax issue or a WinZip issue. The code runs
without error and these three files are created. The temp files are
populated, but the ZIP file is empty. Any ideas?

_Za04560 = 3,321 KB
Stock.zip = 0 bytes
WZ60.tmp = 3,321 KB

If I use the START > Run - this command works without a probolem:
wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf
So that should tell me the command and paths are OK.

<%
Dim oShell, sCommand
'sCommand = "wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf"
sCommand = "wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf"
Set oShell = Server.CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing
%>
thanks!
-----------------------------------------------
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Ol**************@TK2MSFTNGP12.phx.gbl...
Dim oShell, sCommand
sCommand = "wzzip.exe C:\Output\File.zip C:\SourceFiles\File.txt"
Set oShell = Server.CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing

Try that.

Ray at work

"shank" <sh***@tampabay.rr.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
What is the proper syntax to run this command line in ASP?

wzzip.exe File.zip File.txt

thanks


Jan 6 '06 #3

P: n/a
Are those .dbf files in use by your page when you execute that script? Any
open database connections or anything? Throw some test text files in that
directory and try zipping those up to see what happens.

Ray at work

"shank" <sh***@tampabay.rr.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
I'm not sure if this is a syntax issue or a WinZip issue. The code runs
without error and these three files are created. The temp files are
populated, but the ZIP file is empty. Any ideas?

_Za04560 = 3,321 KB
Stock.zip = 0 bytes
WZ60.tmp = 3,321 KB

If I use the START > Run - this command works without a probolem:
wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf
So that should tell me the command and paths are OK.

<%
Dim oShell, sCommand
'sCommand = "wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf"
sCommand = "wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf"
Set oShell = Server.CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing
%>
thanks!
-----------------------------------------------
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Ol**************@TK2MSFTNGP12.phx.gbl...
Dim oShell, sCommand
sCommand = "wzzip.exe C:\Output\File.zip C:\SourceFiles\File.txt"
Set oShell = Server.CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing

Try that.

Ray at work

"shank" <sh***@tampabay.rr.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
What is the proper syntax to run this command line in ASP?

wzzip.exe File.zip File.txt

thanks



Jan 6 '06 #4

P: n/a
Yes they are DBF files, but there is no connection to them. They are just
simple files. I can zip using the RUN dialog box with the below command, but
when I stick the command in the code, all I get is the temp files and an
empty zip file.
thanks!
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:eP**************@TK2MSFTNGP11.phx.gbl...
Are those .dbf files in use by your page when you execute that script?
Any open database connections or anything? Throw some test text files in
that directory and try zipping those up to see what happens.

Ray at work

"shank" <sh***@tampabay.rr.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
I'm not sure if this is a syntax issue or a WinZip issue. The code runs
without error and these three files are created. The temp files are
populated, but the ZIP file is empty. Any ideas?

_Za04560 = 3,321 KB
Stock.zip = 0 bytes
WZ60.tmp = 3,321 KB

If I use the START > Run - this command works without a probolem:
wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf
So that should tell me the command and paths are OK.

<%
Dim oShell, sCommand
'sCommand = "wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf"
sCommand = "wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf"
Set oShell = Server.CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing
%>
thanks!
-----------------------------------------------
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Ol**************@TK2MSFTNGP12.phx.gbl...
Dim oShell, sCommand
sCommand = "wzzip.exe C:\Output\File.zip C:\SourceFiles\File.txt"
Set oShell = Server.CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing

Try that.

Ray at work

"shank" <sh***@tampabay.rr.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
What is the proper syntax to run this command line in ASP?

wzzip.exe File.zip File.txt

thanks



Jan 6 '06 #5

P: n/a
You explained that in your previous post. Did you try testing it with text
files?

Ray at work

"shank" <sh***@tampabay.rr.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Yes they are DBF files, but there is no connection to them. They are just
simple files. I can zip using the RUN dialog box with the below command,
but when I stick the command in the code, all I get is the temp files and
an empty zip file.
thanks!
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:eP**************@TK2MSFTNGP11.phx.gbl...
Are those .dbf files in use by your page when you execute that script?
Any open database connections or anything? Throw some test text files in
that directory and try zipping those up to see what happens.

Ray at work

"shank" <sh***@tampabay.rr.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
I'm not sure if this is a syntax issue or a WinZip issue. The code runs
without error and these three files are created. The temp files are
populated, but the ZIP file is empty. Any ideas?

_Za04560 = 3,321 KB
Stock.zip = 0 bytes
WZ60.tmp = 3,321 KB

If I use the START > Run - this command works without a probolem:
wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf
So that should tell me the command and paths are OK.

<%
Dim oShell, sCommand
'sCommand = "wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf"
sCommand = "wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf"
Set oShell = Server.CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing
%>
thanks!
-----------------------------------------------
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Ol**************@TK2MSFTNGP12.phx.gbl...
Dim oShell, sCommand
sCommand = "wzzip.exe C:\Output\File.zip C:\SourceFiles\File.txt"
Set oShell = Server.CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing

Try that.

Ray at work

"shank" <sh***@tampabay.rr.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
> What is the proper syntax to run this command line in ASP?
>
> wzzip.exe File.zip File.txt
>
> thanks
>



Jan 6 '06 #6

P: n/a
I just tried it with 5 *.txt files. Same results. Two temp files that are
populated and a ZIP file that's empty. Then I ran the command line in the
RUN dialog and it grabbed all 5 text files and zipped them without a
problem. So, same results.

oShell.Run sCommand, , True
What does the empty space between the commas mean?
What does True mean?

thanks!

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:et**************@TK2MSFTNGP12.phx.gbl...
You explained that in your previous post. Did you try testing it with
text files?

Ray at work

"shank" <sh***@tampabay.rr.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Yes they are DBF files, but there is no connection to them. They are just
simple files. I can zip using the RUN dialog box with the below command,
but when I stick the command in the code, all I get is the temp files and
an empty zip file.
thanks!
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:eP**************@TK2MSFTNGP11.phx.gbl...
Are those .dbf files in use by your page when you execute that script?
Any open database connections or anything? Throw some test text files
in that directory and try zipping those up to see what happens.

Ray at work

"shank" <sh***@tampabay.rr.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
I'm not sure if this is a syntax issue or a WinZip issue. The code runs
without error and these three files are created. The temp files are
populated, but the ZIP file is empty. Any ideas?

_Za04560 = 3,321 KB
Stock.zip = 0 bytes
WZ60.tmp = 3,321 KB

If I use the START > Run - this command works without a probolem:
wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf
So that should tell me the command and paths are OK.

<%
Dim oShell, sCommand
'sCommand = "wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf"
sCommand = "wzzip.exe C:\Inetpub\wwwroot\shwholesale\db\shStock.zip
C:\Inetpub\wwwroot\shwholesale\db\*.dbf"
Set oShell = Server.CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing
%>
thanks!
-----------------------------------------------
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Ol**************@TK2MSFTNGP12.phx.gbl...
> Dim oShell, sCommand
> sCommand = "wzzip.exe C:\Output\File.zip C:\SourceFiles\File.txt"
> Set oShell = Server.CreateObject("WScript.Shell")
> oShell.Run sCommand, , True
> Set oShell = Nothing
>
> Try that.
>
> Ray at work
>
> "shank" <sh***@tampabay.rr.com> wrote in message
> news:%2****************@TK2MSFTNGP11.phx.gbl...
>> What is the proper syntax to run this command line in ASP?
>>
>> wzzip.exe File.zip File.txt
>>
>> thanks
>>
>
>



Jan 6 '06 #7

P: n/a
Hi shank,

The empty space should actually be a 0, although a space is okay to use.
But, to be clear, best put a 0 in there. The true means that the script
should wait for your executed command to finish before moving along.
Download the WSH documentation here:
http://www.microsoft.com/downloads/d...6-1C4099D7BBB9

When I run the script in a .vbs file, it works fine. It also works in an
ASP file where my IUSR account has full permissions on the directory in to
which I'm writing the .zip file.

My VBS file that I run:
Dim oShell, sCommand
sCommand = "wzzip.exe C:\Output\File.zip C:\SourceFiles\*.txt"
Set oShell = CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing

My ASP file:
<%
Dim oShell, sCommand
sCommand = "wzzip.exe C:\Output\File.zip C:\SourceFiles\*.txt"
Set oShell = CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing
%>

I'm using Winzip 10. Is your copy of Winzip registered?

Ray at work

As for your script, what kind of permissions does IUSR_[servername] have on
the directory you're trying to zip your files in?
"shank" <sh***@tampabay.rr.com> wrote in message
news:u$**************@TK2MSFTNGP14.phx.gbl...
I just tried it with 5 *.txt files. Same results. Two temp files that are
populated and a ZIP file that's empty. Then I ran the command line in the
RUN dialog and it grabbed all 5 text files and zipped them without a
problem. So, same results.

oShell.Run sCommand, , True
What does the empty space between the commas mean?
What does True mean?

thanks!

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:et**************@TK2MSFTNGP12.phx.gbl...
You explained that in your previous post. Did you try testing it with
text files?

Ray at work

"shank" <sh***@tampabay.rr.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Yes they are DBF files, but there is no connection to them. They are
just simple files. I can zip using the RUN dialog box with the below
command, but when I stick the command in the code, all I get is the temp
files and an empty zip file.
thanks!

Jan 6 '06 #8

P: n/a
Yes I have the registered WinZip Pro version $59.99.
My permissions look right and I have to assume they are correct.
I can write the DBF files from one ASP page.
Then the ASP zip page creates the temp zip files.
That should cover read & writes.
I need to trade a few emails with WinZip I think.
thanks!
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:eK**************@TK2MSFTNGP12.phx.gbl...
Hi shank,

The empty space should actually be a 0, although a space is okay to use.
But, to be clear, best put a 0 in there. The true means that the script
should wait for your executed command to finish before moving along.
Download the WSH documentation here:
http://www.microsoft.com/downloads/d...6-1C4099D7BBB9

When I run the script in a .vbs file, it works fine. It also works in an
ASP file where my IUSR account has full permissions on the directory in to
which I'm writing the .zip file.

My VBS file that I run:
Dim oShell, sCommand
sCommand = "wzzip.exe C:\Output\File.zip C:\SourceFiles\*.txt"
Set oShell = CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing

My ASP file:
<%
Dim oShell, sCommand
sCommand = "wzzip.exe C:\Output\File.zip C:\SourceFiles\*.txt"
Set oShell = CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing
%>

I'm using Winzip 10. Is your copy of Winzip registered?

Ray at work

As for your script, what kind of permissions does IUSR_[servername] have
on the directory you're trying to zip your files in?
"shank" <sh***@tampabay.rr.com> wrote in message
news:u$**************@TK2MSFTNGP14.phx.gbl...
I just tried it with 5 *.txt files. Same results. Two temp files that are
populated and a ZIP file that's empty. Then I ran the command line in the
RUN dialog and it grabbed all 5 text files and zipped them without a
problem. So, same results.

oShell.Run sCommand, , True
What does the empty space between the commas mean?
What does True mean?

thanks!

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:et**************@TK2MSFTNGP12.phx.gbl...
You explained that in your previous post. Did you try testing it with
text files?

Ray at work

"shank" <sh***@tampabay.rr.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Yes they are DBF files, but there is no connection to them. They are
just simple files. I can zip using the RUN dialog box with the below
command, but when I stick the command in the code, all I get is the
temp files and an empty zip file.
thanks!


Jan 6 '06 #9

P: n/a
I have found the problem. The WinZip is user based registration, not server
based. They do not have a server version. It worked with the RUN box because
I was logged in.
thanks for your help!

- - - - - - - - - - -
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:eK**************@TK2MSFTNGP12.phx.gbl...
Hi shank,

The empty space should actually be a 0, although a space is okay to use.
But, to be clear, best put a 0 in there. The true means that the script
should wait for your executed command to finish before moving along.
Download the WSH documentation here:
http://www.microsoft.com/downloads/d...6-1C4099D7BBB9

When I run the script in a .vbs file, it works fine. It also works in an
ASP file where my IUSR account has full permissions on the directory in to
which I'm writing the .zip file.

My VBS file that I run:
Dim oShell, sCommand
sCommand = "wzzip.exe C:\Output\File.zip C:\SourceFiles\*.txt"
Set oShell = CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing

My ASP file:
<%
Dim oShell, sCommand
sCommand = "wzzip.exe C:\Output\File.zip C:\SourceFiles\*.txt"
Set oShell = CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing
%>

I'm using Winzip 10. Is your copy of Winzip registered?

Ray at work

As for your script, what kind of permissions does IUSR_[servername] have
on the directory you're trying to zip your files in?
"shank" <sh***@tampabay.rr.com> wrote in message
news:u$**************@TK2MSFTNGP14.phx.gbl...
I just tried it with 5 *.txt files. Same results. Two temp files that are
populated and a ZIP file that's empty. Then I ran the command line in the
RUN dialog and it grabbed all 5 text files and zipped them without a
problem. So, same results.

oShell.Run sCommand, , True
What does the empty space between the commas mean?
What does True mean?

thanks!

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:et**************@TK2MSFTNGP12.phx.gbl...
You explained that in your previous post. Did you try testing it with
text files?

Ray at work

"shank" <sh***@tampabay.rr.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Yes they are DBF files, but there is no connection to them. They are
just simple files. I can zip using the RUN dialog box with the below
command, but when I stick the command in the code, all I get is the
temp files and an empty zip file.
thanks!


Jan 10 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.