How do I get the context of say the c:\ directory, say all files, into a text file using the adir() command? I have never used it. You'll get a list of files in an array. It's easier to work with array than file.
DIMENSION laList[1]
lcDir = "C:\"
lnFiles = ADIR(laList, lcDir + "*.*")
VFP help is a good place to get details about ADIR() function.
>Alternatively, is there a way to make the following, stop asking me to select a folder each time I run it?Pass directory you wand as a parameter to GetFolder method.
> local oFSO, oFolder, oFile
> clear
lcDir = "C:\"
> oFSO = crea('Scripting.FileSystemObject')
oFolder = oFSO.GetFolder(lcDir)
> for each oFile in oFolder.Files
> ?oFile.Name
> next
--sb--