Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to put the names of files from a folder into a table?

Status
Not open for further replies.

Csilla

Programmer
Sep 19, 2005
1
US
Hi,
I'm trying to write a program in Visual FoxPro. I need to put the names and locations of the files located into a directory/folder into a table.
Can anyone help me?
 
The ADIR() function will give you the names and a lot more besides. If you just want the names of files from folder lcDir in a field named filename then:

[TT]
n=Adir(laNames,lcDir)
Append From Array laNames Fields filename
[/TT]

Look up Adir in Help. There are lots of options and flags to control what it gives you.

Geoff Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top