wildcard copy

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

does anyone know how to do a wildcard copy of several files from one
directory to another in .net?

thanks
 
There is no auto way to do this. You must first get a list of files that
correspond to your wildcard. Then you must copy each of the files
individually.

See references in MSDN for the following:
File.Copy Method
Directory.GetFiles Method

Lloyd Sheen
 
Maybe not what you were thinking, but you could use
System.Diagnostics.Process to launch a new process like

"xcopy Foo*.doc f:\archive_dir"

-Dino
 
Back
Top