0

I am trying to locate the full name of a file using a wildcard. The code I have is:

MLCNo=crjbis.ffromlot
subfolder=LEFT(mlcno,3)
filename=SYS(2000,'S:\MLC\MLC#\'+subfolder+'xx\'+mlcno+'21391*.pdf')
pathname="S:\MLC\MLC#\"+subfolder+"xx\"+filename

Pathname is passed to a print function to print the file. All of this works great if I don't use a variable in the SYS function (even with a wildcard). I should add that there will only ever be one file returned by the wildcard. Is there another way to do this?

Thanks!!! Tammy

Tammy Hartin
  • 69
  • 1
  • 5
  • 1
    Are you trying to search a subdirectory tree for the file that matches your specification? – LAK May 16 '13 at 18:03
  • 1
    Yes. I did find another way, using ADIR(). this post: http://stackoverflow.com/questions/6483215/get-list-of-files-in-a-directory-in-foxpro. Thanks! – Tammy Hartin May 16 '13 at 18:09

0 Answers0