Jump to content
Sign in to follow this  

Loop's?! or prehaps variable string question...

Recommended Posts


Im trying to make a script that will basically delete the users profile. There are accounts on the server as User01 User02 > User20

$message = "Deleting all User Profiles"

SplashTextOn("DELETE SCRIPT", $message, -1, -1, -1, -1, 4, "")

For $x = 1 to 20
    DirRemove ( "C:\Documents and Settings\User"& $x &"",1)
    $message = $message & $x & @LF  
    ControlSetText("DELETE SCRIPT", "", "Static1", $message)



This will work for deleting all the users 10 to 20. I thought about adding something like

IF $x < 10 THEN

$x = 0$x //Basically making the $x = 01 instead of 1 to delete the User01.

Im a n00b and have searched the help file high and low about attatching 1 string to another and cant figure it out :wacko: Sorry if this is stupid, :D

any advice is much appreciated! Cheers

Share this post

Link to post
Share on other sites


Briegel your a star mate.

Thanks for that! Now i know how to add to the string n the stringlength is a much better way of doing it. Cheers

Share this post

Link to post
Share on other sites

Thanks mist3r,

but I am one of the smallest 'autoiter'. Without help from this forum I can't surviving. Next time perhaps you have to help me. :D

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.