Moves Files Using Wildcard?

  • Thread starter Thread starter Andrew Robinson
  • Start date 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
 
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.
 
File.Move does not move between Volumes / Servers.

I was hoping that I could stay away from DOS.

-Andrew
 
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.)
 
Back
Top