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

moving a folder

P: 30
is it possible to move a folder from 1 directory to another

this is the situation, i created a database file and then the database depends on the folder which is of course has the same name as the file database name its dependencies are on this folder. and i have to move the database and its dependencies in to another folder, can i move the folder?


c:\vb projects\part1
db1.db(database)
db1(folder)
..db1files

then i need to move it to

c:\vb projects\part2

i tried

system."io.file.move"
and yes i was able to move the database

but how can i move the folder(db1)?
i tried system.io.directory.move, but it returns an error

thanks in advance.
May 29 '08 #1
Share this Question
Share on Google+
2 Replies


jamesd0142
100+
P: 469
What error are you getting...?

I use

Expand|Select|Wrap|Line Numbers
  1. System.IO.Directory.Move("C:\temp\New Folder", "C:\temp\Captured\New Folder")
  2.  
with no error / Maybe the directory your moving is open?

James
May 29 '08 #2

P: 30
What error are you getting...?

I use

Expand|Select|Wrap|Line Numbers
  1. System.IO.Directory.Move("C:\temp\New Folder", "C:\temp\Captured\New Folder")
  2.  
with no error / Maybe the directory your moving is open?

James
got it thanks..

i forgot about the destination
Jun 5 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.