Sign in to follow this  
Followers 0
dkwokgs

How to use _DirRemoveContents( $sPath )?

4 posts in this topic

Hi there is there a sample of how to use function like _DirRemoveContents( $sPath ) or _Max( $nNum1, $nNum2 ) ?

Please advise. Thanks

Daniel

Share this post


Link to post
Share on other sites



Hi there is there a sample of how to use function like _DirRemoveContents( $sPath ) or _Max( $nNum1, $nNum2 ) ?

Please advise. Thanks

Daniel

<{POST_SNAPBACK}>

They are basically like using any other function in AutoIt. You just have to #include the files that contain the functions before you use them. For an example of _DirRemoveContents():

#include <File.au3>

$RemDir = "C:\TestDir"

If( _DirRemoveContents( $RemDir ) ) Then
   MsgBox( 0, "Success!", "This directory was removed successfully!"
Else
   MsgBox( 16, "Failure!", "An error has occurred while removing this directory, please verify that it exists." )
EndIf

I hope that clears things up a bit.

*** Matt @ MPCS

Share this post


Link to post
Share on other sites

Or just:

$path = 'c:\the folder\you\want to kill'

DirRemove($path,1)
DirCreate($path)

:)

Share this post


Link to post
Share on other sites

in general, I find that looking in the include file gives me what I need to know for each UDF, or the helpfile's section on that include file...


"I'm not even supposed to be here today!" -Dante (Hicks)

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