Dear,

A part of script cleanup.kix is:

code:

$ikey="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
IF (Exist($ikey) = 0)
$info=$info+" user_shell_folders=("
;
$ivalue=ReadValue($ikey, "Cache")
IF ($debug_mode = "yes")
? "recent.user_shell_folders -> "+$ivalue+"="+ExpandEnvironmentVars($ivalue)
ENDIF
IF (len($ivalue) <> 0)
shell "%comspec% /e:1024 /c deltree /y "+CHR(34)+ExpandEnvironmentVars($ivalue)+"\."+CHR(34)
$info=$info+"-cache"
ENDIF
;
$ivalue=ReadValue($ikey, "Cookies")
IF ($debug_mode = "yes")
? "recent.user_shell_folders -> "+$ivalue+"="+ExpandEnvironmentVars($ivalue)
ENDIF
IF (len($ivalue) <> 0)
shell "%comspec% /e:1024 /c deltree /y "+CHR(34)+ExpandEnvironmentVars($ivalue)+"\."+CHR(34)
$info=$info+"-cookies"
ENDIF
;
$ivalue=ReadValue($ikey, "Local Settings")
IF ($debug_mode = "yes")
? "recent.user_shell_folders -> "+$ivalue+"="+ExpandEnvironmentVars($ivalue)
ENDIF
IF (len($ivalue) <> 0)
shell "%comspec% /e:1024 /c deltree /y "+CHR(34)+ExpandEnvironmentVars($ivalue)+"\History\."+CHR(34)
$info=$info+"-local.history"
ENDIF
IF (len($ivalue) <> 0)
shell "%comspec% /e:1024 /c deltree /y "+CHR(34)+ExpandEnvironmentVars($ivalue)+"\Temp\."+CHR(34)
$info=$info+"-local.temp"
ENDIF
IF (len($ivalue) <> 0)
shell "%comspec% /e:1024 /c deltree /y "+CHR(34)+ExpandEnvironmentVars($ivalue)+"\Temporary Internet Files\."+CHR(34)
$info=$info+"-local.temporary_internet_files"
ENDIF
;
$ivalue=ReadValue($ikey, "Recent")
IF ($debug_mode = "yes")
? "recent.user_shell_folders -> "+$ivalue+"="+ExpandEnvironmentVars($ivalue)
ENDIF
IF (len($ivalue) <> 0)
del ExpandEnvironmentVars($ivalue)+"\*.lnk"
$info=$info+"-recent"
ENDIF
$info=$info+"-)"
ENDIF

The shell command can be

code:

f.e. shell "%comspec% /e:1024 /c deltree /y "+CHR(34)+ExpandEnvironmentVars($ivalue)+"\Temporary Internet Files\."+CHR(34)
shell "%comspec% /e:1024 /c deltree /y c:\windows\Temporary Internet Files\."

the code CHR(34) (= "%" sign) is be used for expanding environment variable.
second example is using a fixed path specification.


Greetings.

btw: the deltree command looks like deltree /y pathname

_________________________
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