#25639 - 2002-07-22 08:20 PM
zipping files
|
atiisler
Fresh Scripter
Registered: 2002-07-10
Posts: 34
|
Hi everyone.
Does anyone know if its possible to create a script using kixtart that will zip 4 files creating a zip package that can be then copied?
|
Top
|
|
|
|
#25641 - 2002-07-22 09:03 PM
Re: zipping files
|
atiisler
Fresh Scripter
Registered: 2002-07-10
Posts: 34
|
Thanks...but I really didn't find what I want to do... Let me explain a little better..
I am using a kixtart script that is copy files from a client machine to server drive. This works great for most users. The problem comes with some remote users who have to use dial-up. The script still works but the file copy is SLOWWWWWW. So I thought if I could zip these files then copy over then unzip at the remote users machine, it wouldn't take so long. Is this possible? I would have to initiate the zip program somehow and zip these selected files. I don't intend to zip the kix program. Thanks again
|
Top
|
|
|
|
#25643 - 2002-07-22 09:40 PM
Re: zipping files
|
atiisler
Fresh Scripter
Registered: 2002-07-10
Posts: 34
|
Radimus Are you directing me here because PKzip is not Scriptable...that I can not use it with Kixtart.
Do you know what "wzzip" is ?
|
Top
|
|
|
|
#25644 - 2002-07-22 09:44 PM
Re: zipping files
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
atiisler,
wzzip is the COMMAND-LINE version of WinZIP..
Kent
|
Top
|
|
|
|
#25645 - 2002-07-22 09:45 PM
Re: zipping files
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
pkzip... the DOS version is as scriptable as commandline application is.
so you have a directory of files that you want to zip individually and then copy/move to a network location on a RAS connection?
post the command switched for pkzip and I'll see what I can come up with...
|
Top
|
|
|
|
#25646 - 2002-07-22 09:51 PM
Re: zipping files
|
atiisler
Fresh Scripter
Registered: 2002-07-10
Posts: 34
|
Actually I have a directory of files, but I only want to zip some of the files. I have 5 files out of a directory I want to zip. I do not want to zip each file individually (unless thats the only way) I want to create one zipped file that is including the 5 files.
I am not sure what you meant in your last line...I
|
Top
|
|
|
|
#25647 - 2002-07-22 10:04 PM
Re: zipping files
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
this is untested, and the command will not work, but should give you the idea. requires the makepath() UDF
code:
break on call \\a06\logon\udf.kix
$zipcmd ="?" $source ="c:\drivers\chipset" $temp ="c:\ziptemp" $dest ="$desktop\zip"
if exist($source) if not exist("$temp") makepath("$temp") endif $d=dir($source) while not @error shell'%comspec% /c $zipcmd "$source\$d" "$temp\$d.zip" $d=dir() loop if not exist("$dest") makepath("$dest") endif copy "$temp\*.zip" "$dest" if not @error del "$temp\*.zip" endif endif
|
Top
|
|
|
|
#25649 - 2002-07-22 10:23 PM
Re: zipping files
|
atiisler
Fresh Scripter
Registered: 2002-07-10
Posts: 34
|
So do you think I would be better to zip the files on the server side and then just copy that zipped file to the client and let the client unzip it at that point?
Also Radimus... In your code what does "$zipcmd = "?"" do...I don't really understand.
What I think your saying is copy my selected files to a temp folder and then zip the tempfolder and copy this to my destination folder.Am I correct...
I must confess, I have just started workin with Kixtart.... Thanks...
|
Top
|
|
|
|
#25650 - 2002-07-23 06:23 AM
Re: zipping files
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Of course you can use PKZIP.EXE or PKUNZIP.EXE. As an FYI, if you go to - http://www.winzip.com/wzcline.htm
And download the command-line add-on - http://www.winzip.com/getsite.cgi?wzcline.exe
If we look at one of our batch jobs, we see:
code:
"c:\program files\winzip\wzzip" -u -p -r -xtranslog.* d:\tables.zip d:\backup\tables\*.*
:: wzzip [options] zipfile [@listfile] [files...] :: -f freshen :: -u update :: -p store folder names :: -r recurse folders :: -x exclude file(s)
Have fun!
Kent [ 23 July 2002, 06:23: Message edited by: kdyer ]
|
Top
|
|
|
|
#25653 - 2002-07-23 04:28 PM
Re: zipping files
|
atiisler
Fresh Scripter
Registered: 2002-07-10
Posts: 34
|
I think I have come to that conclusion myself too. Just copying the zipped file without any script or unzipping was still a 10 minute process add on the overhead and I'm sure its going to be about 15 which is the same time as the script that copies the files to the network....
Thanks for all your help.....
|
Top
|
|
|
|
#25655 - 2002-07-23 04:41 PM
Re: zipping files
|
atiisler
Fresh Scripter
Registered: 2002-07-10
Posts: 34
|
Just for clarification sake.... It is not a logon script but a batch file sitting behind an icon on desktop. Also it is the process of copying files on the users local machine to a network directory on a file server for backup purposes. The user is dial up only and I thought the zipping of the files might be a quicker transmission. But as pointed out the overhead of first locating files (script) - then zipping - then unzippingon the server (more script) does not appear to be any quicker or save and bandwidth at all.... Does anyone have any suggestions for a faster delivery? Sorry for any confusion.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 248 anonymous users online.
|
|
|