473,624 Members | 2,584 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

About Copy the Folder and file

16 New Member
I want code for how to copy folder,delete folder from one location to another.


Plz give example

I tried in this code but i couldnt move folder but i moved files(coy),
code,

path = file_object.Get ParentFolderNam e(path)
file_object.Cop yFolder path, destination

This code moves only files not folder.

Please help me,
Sep 20 '08 #1
4 1647
vdraceil
236 New Member
Search this site with keywords "copying files vb"..
Sep 20 '08 #2
lee123
556 Contributor
well i don't know if this is what you want but try this:

Copy Folder

lee123
Sep 20 '08 #3
smartchap
236 New Member
Please see the following URL:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?tx tCodeId=71156&l ngWId=1

For deleting files / folder u can use file's / folder's delete method in the same way as copy.
Sep 30 '08 #4
smartchap
236 New Member
Dear sunilkds and others
Hope the submission at the URL at PSC helped u. If yes please reply and do vote the code there.
Oct 1 '08 #5

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

Similar topics

8
17029
by: Ram Baruch | last post by:
Hi, I'm trying to use the File.Copy() function. It works well when the desenation file is local (Like: C:\dest\dest.exe). The problem is that when I'm trying to copy to a destenation that starts with '\\' it doesnt work and exception is thrown (for example: \\MyComputer\DestDirectory). Even if the first and the second directories are actually the same- the File.Copy() doesn't work. Is there any way to copy a file to a different computer?...
3
2924
by: News | last post by:
Is it possible to delete a file by copying it to the "bit bucket" or "null device"? Back in my youth when I live in VMS-land you could delete a file by copying it to NL: ========== I have written a windows service as part of an interface between two different systems. The first system will write output into a file in a
5
4449
by: Roy | last post by:
My dll file is copied to the "%windir%\Microsoft.NET\Framework\{version}Temporary ASP.NET Files" folder when I compile my asp.net project. When I run the application. The dll under this folder is loaded, not the one under bin folder. Why is that? How can I load the one under bin folder?
2
2240
by: Diffident | last post by:
Hello All, I just finished reading an interesting article by Scott about App Domains: http://odetocode.com/Articles/305.aspx Scott, I have a question about the section "Shadow Copies and Restarts". You talked about "Drain Stopped" and "Shadow Copy" concepts in this article. I maintain a web application which is in production. Every morning the way we build the project is using Visual Studio's IDE to use "Build -> Build<proj-name>"...
8
2565
by: Paw | last post by:
Greetings. I use asp. what I need is is when a visitor comes to the site, I need it to check the host name. if "www.hometowndigest.com" is the host, then check a folder named "something" and if the folder does not exsist, create folder "www" and then copy folder "temp" and its contents. If the folder "www" is there, look in it, check to see if the files in folder "temp" are in there, if not, copy the files that are not from folder...
5
3258
by: Saabster | last post by:
Hi all, It's always the simple stuff that trips you up I guess. Here is the issue I'm dealing with. I have a folder with 1400 excel files that I need to move to another location. Since each file has to go in to a particular target folder I decided that writing a program to move the files is they way to go. I've got all but this last piece down. and for the life of me I can't
1
3880
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
Using .NET 2.0 is it more efficient to copy files to a single folder versus spreading them across multiple folders. For instance if we have 100,000 files to be copied, Do we copy all of them to a single folder called 'All Files' Do we spread them out and copy them to multiple folders like Folder 000 - Copy files from 0 to 1000 Folder 001 - Copy files from 1000 to 2000 Folder 002 - Copy files from 2000 to 2999
3
5139
by: =?Utf-8?B?R2FuZXNoYQ==?= | last post by:
Hi I would like to use File.Copy with UNC paths. I have seen this problem reported by others as well. Can i use File.Copy with UNC paths. ie., i would like to copy a file from one of the folder to a shared folder. eg., File.Copy(srcPath, "\\machinename\\folder) This is giving an error "Could not find part of the path \\machinename\\folder" Is this feature supported? if yes please can anyone let me knwo how to
10
4951
by: Jason | last post by:
I want to create a simple program with Two buttons on the form. BUTTON 1 - BACKUP PREFS this will do the following: Copy C:\Documents and Settings\%USERNAME%\Application Data\FileZilla \sitemanager.xml to this location: \\drake\pvt\%USERNAME%\FileZilla-Prefs\ BUTTON 2 - RESTORE PREFS this will do the opposite:
3
1822
by: sasimca007 | last post by:
Hi friends, I have one small doubt that is, i have to copy one file from tmp folder to the desktop. This is a modperl program, when i write linux command in that modperl program it is recognising tmp folder but it is not recognising the desktop folder. When i run that program in the browser it is telling the error like permission denied. My code is below: package practice::filecopy; sub handler { $r=`cp...
0
8249
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
8179
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
8633
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
8493
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...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4084
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
2613
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
1
1797
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1493
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.