Solved

LIST OF DIRECTORY FILES APPEND TO A TABLE

Posted on 2011-03-22
2
660 Views
Last Modified: 2012-05-11
Hi Experts
I have a  direcotory called  gdata

I woild like to append the  list of all files in gdata including extension names and size to a table called gtable.
Please help
Thnaks
0
Comment
Question by:b001
2 Comments
 
LVL 12

Expert Comment

by:jrbbldr
ID: 35192935
You can use the VFP Function   ADIR()  to get a list of files in a specified directory.

The results will go into the specified array (look in your VFP Help file for details).

You can then LOOP through the array with a FOR/ENDFOR to pick up the names and put them wherever you need.

Good Luck


0
 
LVL 27

Accepted Solution

by:
CaptainCyril earned 500 total points
ID: 35193397
CREATE CURSOR files (filename C(100), size N(12))
nCount = ADIR(aFiles,'gdata\*.*')
FOR i = 1 TO nCount
      INSERT INTO files (filename, size) VALUES (aFiles(i,1), aFiles(i,2))
ENDFOR
BROWSE
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
A Short Story about the Best File Recovery Software – Acronis True Image 2017
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now