Solved

LIST OF DIRECTORY FILES APPEND TO A TABLE

Posted on 2011-03-22
2
683 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This article outlines the process to identify and resolve account lockout in an Active Directory environment.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

770 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