Dear,

We verify our code against kixtart 3.63 release and indeed code works diffe-
rent.
Only using Dir("c:\windows") means: search for file windows
in directory c:\.
With release 4.x it means: search for all entry in directory c:\windows.
Work around is: specify Dir("c:\windows\*.*".

code:

; Kixtart 3.63 + 4.x
;
break on
;
$basedir="e:\Applications\Kixtart\Test"
$filename=Dir("$basedir\*.*")
WHILE ($filename <> "") AND (@error = 0)
IF ($filename <> ".") AND ($filename <> "..") AND (GetFileAttr($basedir+"\"+$filename) & 16)
; ? $basedir+"\"+$filename
GOSUB create_zip
ENDIF
$filename=Dir()
LOOP
EXIT

:create_zip
$cmd=" wzzip -a -ex -rp "
$cmd=$cmd+' "$basedir\'+LTRIM(RTRIM($filename))+'.zip" "$basedir\'+LTRIM(RTRIM($filename))+'" '
; SHELL '%comspec% /c $cmd ' ; <++++++++
? $cmd
RETURN



An output example can be for the "c:\windows" directory:
code:

wzzip -a -ex -rp "c:\windows\INF.zip" "c:\windows\INF"
wzzip -a -ex -rp "c:\windows\SYSTEM.zip" "c:\windows\SYSTEM"
wzzip -a -ex -rp "c:\windows\COMMAND.zip" "c:\windows\COMMAND"


We have comment the SHELL call to prevent an unexpected result during
a test run.
PhoeniX "why it work for others and not me" we think "other persons are using it
in a kixtart 4.x environment.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA