473,666 Members | 2,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

moving a folder

30 New Member
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.direc tory.move, but it returns an error

thanks in advance.
May 29 '08 #1
2 1297
jamesd0142
469 Contributor
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
conics
30 New Member
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

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

Similar topics

4
5497
by: Stephen Ghelerter | last post by:
I am moving a web site with a MySql database to another server. Can I create a database on the new server with the same name and then move the tables there, or is life not that simple? Or can I create tables with no data and then replace them with the files from the other server? I know I can export them as text files and them import them, but that is a lot of trouble. Also, using my FTP program I can't access the mysql folder on the...
3
309
by: nate | last post by:
I created a performance evaluation for our employees on our web server in a folder called 'performanceEval'. Now I wanted to create a slightly modified version for supervisors. I made a new folder on the server called 'supervisorEval' and copied the files from 'performanceEval' to over. Everytime I try to open the project in the 'supervisorEval' folder, Visual Studio opens the original project in the 'performanceEval' folder. There is some...
1
2410
by: Hubert Wong | last post by:
Hi, I am writing some C# code that moves files from a source folder to a target folder on the same machine. However, if the target folder is a shared folder, using the File.MoveTo method alone does not cause the files to be shared as well. How can I make the moved files inherit the parent folder's shared setting? I have looked into the System.Security.Permissions.FileIOPermission class but it doesn't seem to do what I'm looking for. I'm...
6
1905
by: Tim | last post by:
I am in the process of moving a site from one hosting company to another. This site is fairly large, with hundreds of asp files, each with multiple "include" statements. The new host has a different webspace folder structure for it's clients than the old host. At the moment, this is forcing me to have to append all the paths for all the include statements (not to mention all the other path-related code) to make things work. Example:
5
1569
by: Jim Heavey | last post by:
Hello, I am trying to figure out how to put my application onto the server. I am deploying to a Windows 2000 Server When I bring up Internet Services Manager and navigate to the Default Web site and I right click on the default web site folder, do I choose "New Site" or "New Vitural Directory" I am guessing that I would choose "Virtual Directory", but I was not sure. When I follow thought on Virtual Directory option, when I look at the...
0
1001
by: Tom | last post by:
Hi, I have a .NET web application protected by Windows Authentication. Therefore, when accessing the first page, users are prompted to enter their credentials (when not logged on the domain). Most of the pages are using HTTP but one folder is using HTTPS. When moving to this folder, users are prompted again to enter their credentials. Is this normal behaviour? Can this be avoided?
2
1203
by: NeverwaY | last post by:
Had an idea and wondered if it is possible at all. Dim Idea1 as New Idea Idea.show() ("I would like to have a spot on a Form, a box of some sort, that if you were to drag a file or folder on to the spot.... it would move that file to a pre-specified folder. I would like to specify the folder in my code so that the user could not change the dir. Example: The program opens and it creates a folder on the desktop called 'Program Name,' then...
8
2134
by: John Dann | last post by:
Just getting started with VB2005 and unsure how best to move active VB2003 projects into the VB2005 environment. Nornally I've versioned my VB2003 projects at specific development points by starting a new (blank) project and using Add Existing Item to import all the files from the previous project version before saving in a new folder location belonging to the new project. But on doing this in the VB2005 environment I find I've got a...
4
1798
by: fixertool | last post by:
using visual studio 2005, framework 2.0, winXP SP2 I have a winform with two text-boxes, both associated with a folder browser dialog (no problem with this), and a button. First text-box has the origin folder, and the other points to the destination one. Aditionally, I have a "backup" folder. The CONTENT of the origin folder is copied into destination's. But first, I have to move all the destination content to a new subfolder inside...
0
8449
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8360
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8784
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8642
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2774
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.