Solved

LIST OF DIRECTORY FILES APPEND TO A TABLE

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

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…
Always backup Domain, SYSVOL etc.using processes according to Microsoft Best Practices. This is meant as a disaster recovery process for small environments that did not implement backup processes and did not run a secondary domain controller that ne…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

733 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