Find filename in directory to match components
Posted on 2012-03-26
Dear experts -
I am trying to: a) determine if a file exists in a given directory; and b) store the full name of that file (with path) to a variable.
Specifically, I want to see if there is a file in a given directory where: a) the first part of the filename; and b) end part of the filename match a given pattern (for example, in the directory: "J:\purchase orders\" is there a file that begins with the string "2001_ABC1" and ends with the string "_07.pdf".
Any thoughts are greatly appreciated!