Pattern matching when Copying

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
If I want to copy files using a pattern like:

I want all files on a directory that start with 20050822 to be copied to a
different directory. I can't get file.copy or copyfile to accept *.* pattern
matching. Does anyone have the code to make this work? Thanx if you can
help!
 
If it was my problem to solve I would make an array with all filenames in the
directory. Filter the array with a custom or parrent matching function like
System.Text.RegularExpressions.Regex.IsMatch(string, pattern)

don't forget to download a tool to figure out the regular expressions, It
saves you a headacke.
 
That sounds like the way to go about it but I am new at working with
directory files. Would you by chance have a routine to list the directory.
I am not finding the method for doing this. Thanks if you can help!!!
 
Back
Top