Sign in to follow this  
Followers 0
HockeyFan

Array Help...List folders in a certain directory

4 posts in this topic

Can someone help me, please!

I need help creating an array that list the folders in a specific directory (according to certain criteria), and then uses the array output to delete those folders.

Here is what I came up with, but of course, it doesn't work...doesn't delete the folders. :)

#Include <File.au3>
#Include <Array.au3>
$FileList=_FileListToArray("C:\Software\", "Proxy*")
If @Error=1 Then
 MsgBox (0,"","No Files\Folders Found.")
 Exit
EndIf

$Output = _ArrayDisplay($FileList,"$FileList")

DirRemove($Output, 1)

Share this post


Link to post
Share on other sites



Can someone help me, please!

I need help creating an array that list the folders in a specific directory (according to certain criteria), and then uses the array output to delete those folders.

Here is what I came up with, but of course, it doesn't work...doesn't delete the folders. :)

#Include <File.au3>
#Include <Array.au3>
$FileList=_FileListToArray("C:\Software\", "Proxy*")
If @Error=1 Then
 MsgBox (0,"","No Files\Folders Found.")
 Exit
EndIf

$Output = _ArrayDisplay($FileList,"$FileList")

DirRemove($Output, 1)
$FileList is the array of Folders

$Output is only the return value of 1 or 0

Try looping thru the array and do a DirRemove on each element.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Smashly,

Thanks for the Help! :)

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