Jump to content

Recommended Posts

Posted

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)
Posted

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.

 

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
  • Recently Browsing   0 members

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