Jump to content

Recommended Posts

Posted

How can I get a full name for a folder that starts with "data_" and ends with random numbers and characters?

I want to get a folders name inside Temp Directory.

Not sure how to even start. 🤭

Any suggestions? 🤔

Posted
12 minutes ago, Subz said:

You can put the folders into an array using _FileListToArrayRec and then loop through the array, basic example:

#include <File.au3>

Local $aTempDir = _FileListToArrayRec(@TempDir, "data_*", 2, 0, 0, 2)
If @error Then Exit MsgBox(4096, "Error", "No folders found")
For $i = 1 To $aTempDir[0]
    MsgBox(4096, "Folder", "Folder " & $i & " - " & $aTempDir[$i])
Next

 


Thank you for your help. 👌

Looks like I was wrongly executing _FileListToArrayRec() function myself.

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...