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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top