Copying Directories and files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David C

    #1

    Copying Directories and files

    I have an asp.net (VB) page that I am trying to copy subfolders and their
    files into a new folder. I am using the asp.net code below, but it is not
    working. It copies all files in each of the subdirectories but not the
    folders that contain them. Can anyone tell me what I am missing? Thanks.

    David

    For Each foundDirectory As String In
    My.Computer.Fil eSystem.GetDire ctories(strList FolderPath,
    FileIO.SearchOp tion.SearchAllS ubDirectories, "*")
    My.Computer.Fil eSystem.MoveDir ectory(foundDir ectory,
    strCloseFolderP ath, True)
    Next


Working...