|
-
Nov 10th, 2000, 01:54 PM
#1
Thread Starter
_______
I am receiving a zip file from an outside vendor.
The file name is similar to
abc242.20001110.1252.zip
I am shelling pkzip to unzip this file so before I can
do that I must rename the file as pkunzip does not handle long names. Not a problem.
However when I try to extract it, the file inside the zip file has the same name (abc242.20001110.1252.txt) with a txt extension.
Problem: pkunzip can't handle the long name
Is there some way to change this name (insdie the zip file) and have the file unzipped by PKUNZIP. Winzip is available but I haven't tried it as I don't want any user intervention...I would like this done behind the sceens as the user just starts the program, enters a date, and the app does the rest wihtout any further process by user.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 10th, 2000, 01:55 PM
#2
there is a version of pkzip on their website that
works with long filenames
command line version 2.50
-
Nov 10th, 2000, 01:56 PM
#3
Fanatic Member
Maybe the file format specification of a zip file helps you.
btw, when I tried to reply to this thread, this forum said
'Invalid thread specified'. And when I went again to general vb questions, the thread was gone. Then I clicked refresh, and the thread was there and I could reply again.
-
Nov 10th, 2000, 01:58 PM
#4
Fanatic Member
there is a version of pkzip on their website that
works with long filenames
command line version 2.50
Click here to download PkZip 2.50
-
Nov 10th, 2000, 02:05 PM
#5
Thread Starter
_______
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 10th, 2000, 02:09 PM
#6
transcendental analytic
btw, here's how you can get the long filename out of the zip without listing them with pkzip:
http://forums.vb-world.net/showthrea...threadid=37650
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Nov 10th, 2000, 06:45 PM
#7
Thread Starter
_______
<?>
Back to the drawing board. This newer version of pkunzip deals with long names but not on NT.
kedaman, I tried your code but I can't make head nor tail out of it.
[code]
Function FilesInZip() As String()
Dim temp As fileHeader, buffer() As Byte, n As Long, result() As String
Open "C:\windows\desktop\zip_form.zip" For Binary As 1
1> What am I passing to the function?()
2> I assum C:\windows\desk is the file you want to get into
3> I assum you get an 8 digit name in return.
Help!
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 11th, 2000, 02:28 PM
#8
transcendental analytic
well, i was just experimenting with something i got from wotsit, btw a great site So i guess i can improove it a bit, send file as a string and it will open it.
Code:
Function FilesInZip(file as string ) As String()
Open file For Binary As 1
Nope i've tested, it returns full names, in a variable length string array.
The thing is that i read a fixed length header, of which i get the name length (in a specific integer). Next i read the filename itself. Strconv just converts the byte array into string. next theres something i'm not too sure about, some version of zips have an extra descriptor which i have to jump over. The whole loop goes until the end of file and skips directory data by checking for the signature in the header. 
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|