By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,692 Members | 1,246 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,692 IT Pros & Developers. It's quick & easy.

moving files in .net

P: n/a
ok, so I guess I know less about .net than I was willing to admit, I'm just
transitioning from vb6 and a something are different, some things are new...
so bear with me, and thanks in advance
How do I move a file in vb.net
How do I create a folder in vb.net
is there a file manipulation class somewhere that can do these or Do I have
to do a read/write copy manually.

thanks -J
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

The Fileinfo and DirectoryInfo classes have a moveto method.

Ken
-----------
"Shadowboxer" <sh*********@mac.com> wrote in message
news:bk********@library1.airnews.net...
ok, so I guess I know less about .net than I was willing to admit, I'm just transitioning from vb6 and a something are different, some things are new... so bear with me, and thanks in advance
How do I move a file in vb.net
How do I create a folder in vb.net
is there a file manipulation class somewhere that can do these or Do I have to do a read/write copy manually.

thanks -J

Nov 20 '05 #2

P: n/a
Cor
Shadowboxer,
File handling in VB.net is very easy,
There are a lot of commands.
Search in MSDN for
the directory class
the directoryinfo class
the file class
the fileinfo class

By instance to move a file from a to b can be
file.move(pathA,pathB)

Create a folder
Directory.CreateDirectory(path)

But look first in the documentation before you do that, things like
overwriting a file is not nice when it is not intended.

And don't forget to import system.io

I hope this helps a little bit.
Cor
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.