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