Jump to content

Recommended Posts

Posted

Hello,

I'm trying to get the script to display a list of files in a subdirectory. I've tried using a variable, and recalling the variable - but the thing is, it only returns a "0".

How can I list the files? Thanks!

Global $Buyers

$Buyers = FileRead("C:\D\C21\Database\Buyers")

GUICtrlCreateTab(50, 50, 700, 300)

GUICtrlCreateTabItem("Buyers")

GUICtrlCreateLabel(call($Buyers), 60, 80, 700, 300)

  • Moderators
Posted

enigmaforceiv,

Welcome to the AutoIt forum. :)

Might I suggest looking at the Help file? You will see that FileRead is defined as:

"Read in a number of characters from a previously opened text file"

and so is unlikely to do what you want. ;)

The function you do need is FileListToArray:

"Lists files andor folders in a specified path"

If you need to list the content deeper in the tree you might like to take a look at my RecFileListToArray UDF (link is in my sig). :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

  • Moderators
Posted

enigmaforceiv,

My pleasure. :)

We are very proud of our Help file - always worth a look in there when you are looking for a solution. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

  • Moderators
Posted

enigmaforceiv,

Array.au3 is an include file - a library of functions that you can use in your scripts. You can find these functions under the <User Defined Function Reference> section of the Help file. :)

You need to open the "AutoIt3Help.exe" file to get the full Help file - it links the native and UDF Help files into one package. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

  On 8/31/2012 at 7:05 AM, 'Melba23 said:

You need to open the "AutoIt3Help.exe" file to get the full Help file - it links the native and UDF Help files into one package. ;)

Does SciTE open the full help file by default ?

A true renaissance man

  • Moderators
Posted

Attckdog,

If you can see the <User Defined Function Reference> section when you press F1 then I suppose it does. Have you tried it to see? I have. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

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