Copying Directories and files

Discussion in 'ASP .Net' started by David C, Mar 12, 2008.

  1. David C

    David C Guest

    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.FileSystem.GetDirectories(strListFolderPath,
    FileIO.SearchOption.SearchAllSubDirectories, "*")
    My.Computer.FileSystem.MoveDirectory(foundDirectory,
    strCloseFolderPath, True)
    Next
    David C, Mar 12, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric Bresie
    Replies:
    1
    Views:
    1,739
    Ryan Stewart
    Feb 13, 2004
  2. freesoft_2000

    Copying Directories

    freesoft_2000, Aug 15, 2005, in forum: Java
    Replies:
    4
    Views:
    393
    Roedy Green
    Aug 16, 2005
  3. Adam Petrie
    Replies:
    8
    Views:
    306
    Adam Petrie
    Oct 11, 2004
  4. Ron Smith
    Replies:
    5
    Views:
    146
    Michele Dondi
    Nov 2, 2004
  5. Replies:
    17
    Views:
    93
    Rustom Mody
    May 22, 2014
Loading...

Share This Page