S
shank
What is the proper syntax to run this command line in ASP?
wzzip.exe File.zip File.txt
thanks
wzzip.exe File.zip File.txt
thanks
Ray Costanzo said: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/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-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 said: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 said: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/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-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 said: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!
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.