Sign in to follow this  
Followers 0
sylvershark

Delete folder

3 posts in this topic

#1 ·  Posted (edited)

Hi there,

I started with autoit today and it looks wicked and i'm trying to make some "simple" scripts.

I made something that deletes 2 folders wich works :P :

$Folder1 = "badfolder"
$Folder2 = "verybadfolder"
DirRemove($Folder1) 
DirRemove($Folder2)

But I would like the script to say when it didn't find these 2 folders: "You are clean!"

And if it found the folders : "Oh ow, You have bad folders ! Press ok to delete them"

How can I do that? :)

I suppose it must be by using the "if" command but then what?

Thx in advance

Edited by sylvershark

Share this post


Link to post
Share on other sites



Hi there,

I started with autoit today and it looks wicked and i'm trying to make some "simple" scripts.

I made something that deletes 2 folders wich works :P :

$Folder1 = "badfolder"
$Folder2 = "verybadfolder"
DirRemove($Folder1) 
DirRemove($Folder2)

But I would like the script to say when it didn't find these 2 folders: "You are clean!"

And if it found the folders : "Oh ow, You have bad folders ! Press ok to delete them"

How can I do that? :)

Thx in advance

look at fileexists()


---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

Thank you, I just found it in the documentation, but you were faster ^^


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  
Followers 0