MCA,I've tryed the code over and over, and I'm sure I understand it yet for me it will just roll through the routine and EXIT. I have no idear why, or can find a method to make it work.
code:
break on
;
$basedir="C:\windows"
$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
This is what I'm running for the sake of example and continuity I'm using C:\windows
This is the debug lines:
break on
$basedir="C:\windows"
$filename=Dir("$basedir")
WHILE ($filename <> "") AND (@error = 0)
IF ($filename <> ".") AND ($filename <> "..") AND (GetFileAttr($basedir+"\"+$fil
ename) & 16)
$filename=Dir()
LOOP
EXIT
I would say it can't find any directories.
The code would appear to work for everyone but me.
Extreamly bothered!!!
Phoe.