473,809 Members | 2,842 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CopyDirectory

I am using VB in my web page. I am using
My.Computer.Fil eSystem.CopyDir ectory(strListF olderPath, strCloseFolderP ath)
to copy one directory and all subdirectories to another location. Is there
any other way than using DirectoryExists to make sure the copy succeeded
before I delete the source directory? I know that sometimes the file system
is slow to recognize an operation. Thanks.

David
Dec 13 '07 #1
1 1578
On Dec 13, 11:51 pm, "David C" <dlch...@lifeti meinc.comwrote:
I am using VB in my web page. I am using
My.Computer.Fil eSystem.CopyDir ectory(strListF olderPath, strCloseFolderP ath)
to copy one directory and all subdirectories to another location. Is there
any other way than using DirectoryExists to make sure the copy succeeded
before I delete the source directory? I know that sometimes the file system
is slow to recognize an operation. Thanks.
Hi David,

I think you might try to compare directories, see example:
http://www.vbforums.com/showthread.php?p=2767542 or use
FileSystem.Move Directory Method

Dec 14 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3360
by: Antonio Lopez Arredondo | last post by:
hi all !!! I need to copy a folder and its subfolders to another location; which class should I use ? could only find the System.IO.Directory.MOVE but don't know how to COPY. thanks in advance, ant
3
4573
by: orekinbck | last post by:
Hi There Is there any easy way to use the System.Compression tools in .NET 2.0 to compress an entire directory ? All my source code is kept in a single directory so I have written a utility that recursively backs up the directory and compresses each file as it goes. The utility has no GUI. I have attached the program here, I would be interested to get any
4
9470
by: Jason Moss | last post by:
How would I copy all the contents of one folder (Including all subfolders + files) in VB.NET? Could you please provide source code or step by step instructions (I'm only a novice) -Jason
2
1520
by: Jeremy | last post by:
I am writing a little appliation. One process I want to do is to copy a folder to a different location, delete the contents of the original folder, and fill the original location with new files. It's a relatively simple process, but I've run into a little snag. With Full Control privileges, I am getting an error stating that I do not have permission to delete a file in the original location. I do not believe that this file is in use,...
14
2036
by: henrik.sorensen | last post by:
Hi List, I am looking for a way to do a case insensitive search for file names. Anybody have some hints ? thanks Henrik pl1gcc.sourceforge.net
14
2300
by: Professor Yonce | last post by:
I have made form for E-Mail. I have entered code but the Import system does not work. It has squiggly line underneath it showing it is not communicating. It Will not build. Public Class Form3Bio1 System.Net.Mail.SmtpClient Imports System.Net.Mail ' This line before ' does not work. I have the rest of code to try if and when I am able to get System working. ' I XXX out certain entrys below just for this publication.
1
2595
by: =?Utf-8?B?bWFnZWxsYW4=?= | last post by:
hi all, I have a button (stopcopy) that I want the user to cancel out of a long file copying operation. I'm not clear what I should "adding" in the sub to make this happen besides & return. I want to stop/cancel the file io operation and return back to the calling form.
5
3044
by: =?Utf-8?B?UGF0Y2g2MQ==?= | last post by:
I am new to .Net programming, but I am experienced with VB6. I am using VB 2008 Express to write a small program to copy a directory structure and files from a CD to a folder on C: drive. I have a form with 2 buttons; one to do the copying and one to cancel. Here is my code for the copying button: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
6
2420
by: chrisbirk | last post by:
Hi! I want to write an application on windows xp, which iterates n times a model script (exe) and copies every single run the results (multiple files such as text, maps, subfolders,etc) from the existing folder into a new one. The code works, but no files nor folders are copied. This is how far as I got being an absolute beginner in Java. Thanks for any help, CB import java.io.*; public class PCRmain { public static void...
0
9600
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
10376
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...
1
10375
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10114
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
9198
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
6880
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
5548
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...
2
3860
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.