Page 1 of 1 1
Topic Options
#25639 - 2002-07-22 08:20 PM zipping files
atiisler Offline
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
#25640 - 2002-07-22 08:36 PM Re: zipping files
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
If you were to search the "Scripts" forum for the word "ZIP" in the subject line, you would get more than enough hits to know that it can be done.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#25641 - 2002-07-22 09:03 PM Re: zipping files
atiisler Offline
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
#25642 - 2002-07-22 09:33 PM Re: zipping files
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
this isn't a begginner's answer, but what you want to do is in this thread: http://81.17.37.55/board/ultimatebb.php?ubb=get_topic;f=13;t=000122
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#25643 - 2002-07-22 09:40 PM Re: zipping files
atiisler Offline
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 Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
atiisler,

wzzip is the COMMAND-LINE version of WinZIP..

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#25645 - 2002-07-22 09:45 PM Re: zipping files
Radimus Moderator Offline
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...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#25646 - 2002-07-22 09:51 PM Re: zipping files
atiisler Offline
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 Offline
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

_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#25648 - 2002-07-22 10:12 PM Re: zipping files
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
atiisler,
Have you thought this through? Is the ZIpping and unZIPping do be done from within the same script session?

start script... zip files... send files... unzip... end script

Unless you setup some sort of client / server script pair with handshaking, you're not really saving any bandwidth. Whatever you do on the server from the client will have to go over the RAS pipe twice because it's done in the client's memory.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#25649 - 2002-07-22 10:23 PM Re: zipping files
atiisler Offline
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 Offline
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 ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#25651 - 2002-07-23 03:49 PM Re: zipping files
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
atiisler:

Can you enlighten us as to what exactly you are trying to accomplish. As far as I understand your problem, you're ZIPping some file on a server, copy them to a client, then UNZIPing them on the client side within the same script?

If you do this to save bandwidth, then this approach will definitely not result in less but more bandwidth usage.
_________________________
There are two types of vessels, submarines and targets.

Top
#25652 - 2002-07-23 04:24 PM Re: zipping files
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Jens,
I'm as confused as you. In his second post he said it was from client to server but in the fifth, it's from server to client.

No mention of whether it's a logon or other script. I sat on my hands for fifteen minutes... should have held out longer...
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#25653 - 2002-07-23 04:28 PM Re: zipping files
atiisler Offline
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
#25654 - 2002-07-23 04:29 PM Re: zipping files
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
The thing is I don't even understand what he's trying to accomplishg by transferring a ZIP file. It doesn't seem to be for archiving purposes, though.

So, I would really like to get a clarification as to what the big picture is in this case.
_________________________
There are two types of vessels, submarines and targets.

Top
#25655 - 2002-07-23 04:41 PM Re: zipping files
atiisler Offline
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
#25656 - 2002-07-23 04:46 PM Re: zipping files
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Another thing to factor is compression over RAS. Modems will automatically compress the data stream so pre-compressing the data negates that.

If the data were pre-compressed on the far side(where the data is) and uncompressed locally, a small improvement may be realized, but if the compressing/decompressing is done on the same side, the bandwidth will increase rather than decrease.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#25657 - 2002-07-23 04:56 PM Re: zipping files
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Couldn't have said it better. Just copy the raw files with no compression at all.

Also, if the script on the user's desktop will decompress the script ont he fileserver, then your bandwidth usage will go though the roof. The reaosn is that the ZIP file will be transmitted back tot he user's desktop for the decompression in local memory and then the unZIPed files will be transmitted back to the fileserver. Therefore, the user's script should not do anything on the remote fileserver like decompressing.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.071 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org