Moves Files Using Wildcard?

  • Thread starter Andrew Robinson
  • Start date
A

Andrew Robinson

Is there any method of moving files within the .NET framework?

Something along the lines of System.IO.File.Move() ?

I need the ability to move between volumes and/or servers using wildcards.
Hoping that I don't have to write my own.

thanks,

-Andrew
 
J

Jon Skeet [C# MVP]

Andrew Robinson said:
Is there any method of moving files within the .NET framework?

Something along the lines of System.IO.File.Move() ?

I need the ability to move between volumes and/or servers using wildcards.
Hoping that I don't have to write my own.

You can use Directory.List to do the wildcard matching, then call
File.Move repeatedly. It shouldn't be too hard.
 
A

Andrew Robinson

File.Move does not move between Volumes / Servers.

I was hoping that I could stay away from DOS.

-Andrew
 
S

Steven Cheng[MSFT]

Hi Andrew,

As for the File.Move , wildcards are not supported so I think Jon's
suggestion is reasonable. And I'm still not sure on the "move between
Volumes / Servers."

what does the "Servers" you mentiond means? Cross machine boundary or ...?
As the msdn document said, the File.Move will support moving across disk
volumes.

Please feel free to let us know your detailed scenario or any further
problems you met, Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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

Top