Solved

copy files

Posted on 2008-06-25
7
201 Views
Last Modified: 2013-11-26
Using visual basic 2005 how can I copy file from folder(s) to multiple folder

for example

I have folder 1, folder 2, and folder 3

I want to copy folder 1 to c:\a\ed\op\
I want to copy folder 2 to c:\op\a\q
I want to copy folder 3 to c:\op\uj\op

How is this possible using visual basic 2005 studio
0
Comment
Question by:CalmSoul
  • 4
  • 3
7 Comments
 
LVL 48

Expert Comment

by:jpaulino
Comment Utility
Hi CalmSoul,


You can use:

my.Computer.FileSystem.CopyDirectory(source, destination)
0
 
LVL 5

Author Comment

by:CalmSoul
Comment Utility
my source is where my project executable is... how can i do that?
0
 
LVL 5

Author Comment

by:CalmSoul
Comment Utility
any imports for this command?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 48

Expert Comment

by:jpaulino
Comment Utility
You can use this:

My.Computer.FileSystem.CopyDirectory(Application.StartupPath + "\", "C:\DestinationPath\")
0
 
LVL 48

Expert Comment

by:jpaulino
Comment Utility
Application.StartupPath + "\", will give you the EXE path, you just need to add the folder name like

Application.StartupPath + "\folder1\"
0
 
LVL 5

Author Comment

by:CalmSoul
Comment Utility
whats wrong with this ?

My.Computer.FileSystem.CopyDirectory(Application.StartupPath + "\folder1\", "" & Me.FolderBrowserDialog1.SelectedPath.ToString + "b\a\" & ")
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
Comment Utility
Try this way:

My.Computer.FileSystem.CopyDirectory(Application.StartupPath + "\folder1\", "" & Me.FolderBrowserDialog1.SelectedPath.ToString + "\b\a\" & ")

0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now