Click here to Skip to main content
15,894,720 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionCopy any Folder & its Sub Folder in My Document Pin
Vikash Yadav17-Feb-07 17:59
Vikash Yadav17-Feb-07 17:59 
AnswerRe: Copy any Folder & its Sub Folder in My Document Pin
MatrixCoder17-Feb-07 18:28
MatrixCoder17-Feb-07 18:28 
This may look a bit confusing, but it's it really easy.

Dim Path As String = "D:\"

For Each Directory As String In My.Computer.FileSystem.GetDirectories(Path, FileIO.SearchOption.SearchAllSubDirectories)
    Dim DirName As String = Directory
    Dim Pos As Integer = DirName.LastIndexOf("\")
    DirName = Directory.Remove(0, Pos)
    My.Computer.FileSystem.CopyDirectory(Directory, My.Computer.FileSystem.SpecialDirectories.MyDocuments & DirName, True)
Next

For Each File As String In My.Computer.FileSystem.GetFiles(Path, FileIO.SearchOption.SearchTopLevelOnly)
    Dim FileName As String = File
    Dim Pos As Integer = FileName.LastIndexOf("\")
    FileName = File.Remove(0, Pos)
    My.Computer.FileSystem.CopyFile(File, My.Computer.FileSystem.SpecialDirectories.MyDocuments & FileName, True)
Next


Hope this helps!





Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.

AnswerRe: Copy any Folder & its Sub Folder in My Document Pin
TwoFaced17-Feb-07 18:45
TwoFaced17-Feb-07 18:45 
QuestionColor of a Pixel in a image in a pictureBox Pin
charchabil0317-Feb-07 7:58
charchabil0317-Feb-07 7:58 
AnswerRe: Color of a Pixel in a image in a pictureBox Pin
Christian Graus17-Feb-07 9:48
protectorChristian Graus17-Feb-07 9:48 
AnswerRe: Color of a Pixel in a image in a pictureBox Pin
The ANZAC17-Feb-07 14:14
The ANZAC17-Feb-07 14:14 
Questioncrystal report multiple headings Pin
nilam1117-Feb-07 1:51
nilam1117-Feb-07 1:51 
Questiondatetime setting Pin
nilam1117-Feb-07 1:31
nilam1117-Feb-07 1:31 
AnswerRe: datetime setting Pin
nlarson1117-Feb-07 1:45
nlarson1117-Feb-07 1:45 
QuestionHow to deploy .net Crystal Report with .net setup project Pin
Ali 11016-Feb-07 23:38
Ali 11016-Feb-07 23:38 
QuestionColor of a Pixel in a image in a pictureBox Pin
charchabil0316-Feb-07 23:13
charchabil0316-Feb-07 23:13 
AnswerRe: Color of a Pixel in a image in a pictureBox Pin
Guffa17-Feb-07 1:12
Guffa17-Feb-07 1:12 
GeneralRe: Color of a Pixel in a image in a pictureBox Pin
charchabil0317-Feb-07 3:52
charchabil0317-Feb-07 3:52 
AnswerRe: Color of a Pixel in a image in a pictureBox Pin
Guffa17-Feb-07 9:31
Guffa17-Feb-07 9:31 
AnswerRe: Color of a Pixel in a image in a pictureBox Pin
The ANZAC17-Feb-07 14:11
The ANZAC17-Feb-07 14:11 
QuestionHow do i store my font and return back. Pin
.NetRams16-Feb-07 22:30
.NetRams16-Feb-07 22:30 
AnswerRe: How do i store my font and return back. Pin
Dave Kreskowiak17-Feb-07 10:37
mveDave Kreskowiak17-Feb-07 10:37 
QuestionHow to use AddressOf with a Function in an API into VB.Net Pin
MammadAlimoradi16-Feb-07 22:04
MammadAlimoradi16-Feb-07 22:04 
AnswerRe: How to use AddressOf with a Function in an API into VB.Net Pin
Dave Kreskowiak17-Feb-07 10:33
mveDave Kreskowiak17-Feb-07 10:33 
QuestionHow do i know my control have Set BringtoFront? Pin
.NetRams16-Feb-07 21:57
.NetRams16-Feb-07 21:57 
AnswerRe: How do i know my control have Set BringtoFront? Pin
Dave Kreskowiak17-Feb-07 10:26
mveDave Kreskowiak17-Feb-07 10:26 
QuestionControls created on one thread cannot be parented to a control on a different thread. Pin
charchabil0316-Feb-07 20:39
charchabil0316-Feb-07 20:39 
AnswerRe: Controls created on one thread cannot be parented to a control on a different thread. [modified] Pin
TwoFaced16-Feb-07 22:15
TwoFaced16-Feb-07 22:15 
GeneralRe: Controls created on one thread cannot be parented to a control on a different thread. Pin
charchabil0317-Feb-07 6:09
charchabil0317-Feb-07 6:09 
QuestionAdding additional text to Dropdown list Pin
Praveen 12316-Feb-07 17:41
Praveen 12316-Feb-07 17:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.