Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem Retrieve File List
Message
 
To
10/06/1999 18:25:59
Ronald Suen
Epic Solutions Inc.
Edmonton, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00228593
Message ID:
00228662
Views:
17
>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,

Include your path in your aDir like in the following statement

lnFiles = ADIR(lafile, THISFORM.cCodaPath + '*.*')

José
Previous
Reply
Map
View

Click here to load this message in the networking platform