Jump to content

Recommended Posts

Posted

I've had a bit of a search for this but haven't turned up any conclusive results...

How can I perform a function on each file in a directory - I'm guessing while or for, but I don't see how to put all of these in an array and iterate through them - or have I got the wrong end of the stick?

TIA

Posted (edited)

straight from help

#Include <Array.au3>
$FileList=_FileListToArray(@DesktopDir)
If (Not IsArray($FileList)) and (@Error=1) Then
    MsgBox (0,"","No Files\Folders Found.")
    Exit
EndIf
_ArrayDisplay($FileList,"$FileList")

8)

Edited by Valuater

NEWHeader1.png

Posted

straight from help

#Include <Array.au3>
$FileList=_FileListToArray(@DesktopDir)
If (Not IsArray($FileList)) and (@Error=1) Then
    MsgBox (0,"","No Files\Folders Found.")
    Exit
EndIf
_ArrayDisplay($FileList,"$FileList")

8)

Point taken :o

Wood for the trees...

Thanks for taking the time for a noob

Posted

Hi,

If you need more control and recursing, there are a number of solutions in the thread, link in my signature for "recurse"

Best, Randall

I'm only need the files one directory deep - but the link is bookmarked and has given me ideas for expansion

tnx

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
×
×
  • Create New...