>How to get only the names of the text (*.txt) files from a user specified directory at runtime. The output should be same as dir *.txt /b (at DOS prompt).
The easiest thing to do is to avoid dumping into a text file at all and use the ADIR() command to create an array; if neded, you can dump the result to a file or cursor after the fact:
DECLARE aFileList[1,5]
? ADIR(aFileList,ADDBS(FULLPATH(cSomePath))+'*.TXT') && prints # of files found
>When RUN command is executed within VFP, DOS window is displayed. How to suppress the same.
You can use my API_APPRUN class, which can run DOS commands hidden or minimized without the DOS box ever appearing. it can be downlaoded from here on UT,