Jump to content

Delete folder


 Share

Recommended Posts

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
Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...