Page 1 of 1 1
Topic Options
#138307 - 2005-04-20 08:43 PM A kix script to start me off....
Rooster10 Offline
Fresh Scripter

Registered: 2004-10-14
Posts: 14
Hi,

Can someone help, I need to write a small kix script that I can grow from, I have almost got it sussed but can someone let me know how I can do the following in KIX?

Open up the c:\temp folder, delete the contents and then empty the recycle bin after?

From here I can build a PC clean up kix file myself ( I hope )

Many many many many thanks for your help

Dan ( beginner )

Top
#138308 - 2005-04-20 08:55 PM Re: A kix script to start me off....
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
There are some examples in the KiXtart download from here..

If we think about KiX, it really is an extension of DOS, so deleting the files from the C:\Temp would be simply:
Code:

DEL 'C:\TEMP\*.*'



And no need to go to the recycle bin.

HTH,

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

Top
#138309 - 2005-04-20 09:04 PM Re: A kix script to start me off....
Rooster10 Offline
Fresh Scripter

Registered: 2004-10-14
Posts: 14
Many thanks for that, didn't realize it was that simple.. do you have any other jazzy examples which can be used for a PC clean up?
For example I have to check the Environment Variables and edit them, something in the registry maybe??

Top
#138310 - 2005-04-21 12:43 AM Re: A kix script to start me off....
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Sure. Something like (untested)
Code:

cls
break on
? 'Hit ctrl-c to break out of this script'
? 'Otherwise press a key to continue'
get $
SHELL '%COMSPEC% /C del %windir%\prefetch\*.* /q'
SHELL '%COMSPEC% /C del "%userprofile%\Local Settings\Temp\*.*" /q /s /f'
SHELL '%COMSPEC% /C del "%userprofile%\Local Settings\Temporary Internet Files\*.*" /q /s /f'
?'Process is complete.. Press a Key'
get $



{edit}
fixed to be "safer" code
{/edit}

HTH,

Kent


Edited by kdyer (2005-04-21 12:55 AM)
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#138311 - 2005-04-25 12:19 AM Re: A kix script to start me off....
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
There are also UDFs in the UDF forum for deleting files based on age, and for manipulating the PATH variable.
_________________________
There are two types of vessels, submarines and targets.

Top
#138312 - 2005-04-25 04:33 PM Re: A kix script to start me off....
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
I will have to admit, this is based on some code that I "stole" from the LangaList and his batch file for cleaning systems is much more significant than what I posted, but if you distill it down, what I posted is what you get with KiX.

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

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
1 registered (Allen) and 581 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.057 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