Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

probs with pkzip 2

Status
Not open for further replies.

Wilber007

Programmer
Aug 15, 2001
13
GB
hello people,

i am having a few difficulties with pkzip, here is my sub:

Public Sub compress_files_to_zip()

Shell "pkzip C:\LR98\DESKTOP\VB\temp\ftp.zip C:\LR98\DESKTOP\VB\temp\tempFTP.txt"
Shell "pkzip C:\LR98\DESKTOP\VB\temp\IPscan.zip C:\LR98\DESKTOP\VB\temp\tempIPscan.txt"
Shell "pkzip C:\LR98\DESKTOP\VB\temp\PingFlood.zip C:\LR98\DESKTOP\VB\temp\tempPingFlood.txt"
Shell "pkzip C:\LR98\DESKTOP\VB\temp\PortScan.zip C:\LR98\DESKTOP\VB\temp\tempPortScan.txt"
Shell "pkzip C:\LR98\DESKTOP\VB\temp\smtp.zip C:\LR98\DESKTOP\VB\temp\tempsmtp.txt"
Shell "pkzip C:\LR98\DESKTOP\VB\temp\SynFlood.zip C:\LR98\DESKTOP\VB\temp\tempSynFlood.txt"

End Sub

now for some reason some of the lines will work & compress the txt files and some lines won't compress, with the message 'nothing to do'.

any ideas?

most appreciative,
wilber007
 
Hi W,

'Nothing to do' usually indicates an empty file, i.e. zero kb filesize.

Regards,

Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience." darrylles@totalise.co.uk
 
that was my first thought that the files were too small, but even when i bumped up the sizes to over 100 kb each, it still came up with the same problem and error message!

its very frustrating!!
 
I had a similar problem using the command line interface for WinZip. I ended up hardcoding the double quote " and that seemed to fix the problem.

Try something like this
const kPkzip = "pkzip "
dim strSource as string
dim strDest as string

strSource = Chr(34) & "C:\LR98\DESKTOP\VB\temp\tempFTP.txt" & Chr(34)
strDest = Chr(34) & "C:\LR98\DESKTOP\VB\temp\ftp.zip" & Chr(34)

Shell kPkzip & strDest & " " & strSource

Again that seemed to be the fix for me using the WinZip command line interface. It also seems a little strange that the destination is listed first in the command line. I haven't used pkzip but it seems that it's typical to see the source first then destination??

Hope that helps,
Dave
 
Hi,

pkzip [options] destination source
pkunzip [options] destination source

always has worked like this since year dot.

(Must have originated from Unix programmers - lol).

Regards,

Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience." darrylles@totalise.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top