Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem Retrieve File List
Message
From
10/06/1999 18:25:59
Ronald Suen
Epic Solutions Inc.
Edmonton, Alberta, Canada
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Problem Retrieve File List
Miscellaneous
Thread ID:
00228593
Message ID:
00228593
Views:
46
Hi all,

I want to retrieve a list of all the files in a subdirectory which will then be used as part of a copy routine. Unfortunately, I am unable to set the current directory to the subdirectory before retrieving the list. What I have happening instead is that the file list that is being retrieved is that of the project directory and not the subdirectory. Below is the code that I am using to do this. Help?

lcSourcePath = Application.DefaultFilePath + "\Reports\Prgs\"
lcDestPath = ALLTRIM(THISFORM.txtM2MPath.Value) + "Reports\Prgs\"

SET PATH TO (lcSourcePath)

lnFileCount = ADIR(laFiles)

FOR lnLoopCount = 1 TO lnFileCount
COPY FILE (lcSourcePath + laFiles[lnLoopCount,1]) TO (lcDestPath + laFiles[lnLoopCount,1])
ENDFOR

Thanks in advance,
Ronald Suen
Epic Information Solutions Inc.
Ph: (780) 488-4418
Fax: (780) 488-0402
Next
Reply
Map
View

Click here to load this message in the networking platform