Copy Folders via ASP.NET

Discussion in 'ASP .Net' started by Johnny Fugazzi, Apr 26, 2005.

  1. I have a relatiovely simple need.

    I would like to have a webpage that a user can go to, fill out a couple of
    fields, and then hit OK where the result is that a Folder Template is copied
    and a new folder is created. The folders in question are on a IIS based
    FTP server.

    I am locking down the folder structure in an attempt to keep users from
    creating tons of oddly named and managed folders. Instead, I would like all
    new folder to be copies of a template that has the correct folder
    permissions for each subfolder.

    In general, this is easy. Use XCOPY, right? Well, I want to be able to do
    it from a webpage.

    Can anyone point me in the right direction? I know that System.IO.Directory
    can create and read directories... but there is nothing there to copy a
    directory, let alone keep the perms in tact.

    Thanks
    Johnny Fugazzi, Apr 26, 2005
    #1
    1. Advertising

  2. Johnny Fugazzi

    Jay Douglas Guest

    I've used a code snippet from CodeProject to copy a directory ... As for
    persisting security information, I'm not to sure. With a little
    modification of the following code, you should be able to achieve your goal.

    http://www.codeproject.com/csharp/copydirectoriesrecursive.asp


    --
    Jay Douglas
    http://jaydouglas.com


    "Johnny Fugazzi" <> wrote in message
    news:...
    >I have a relatiovely simple need.
    >
    > I would like to have a webpage that a user can go to, fill out a couple of
    > fields, and then hit OK where the result is that a Folder Template is
    > copied and a new folder is created. The folders in question are on a IIS
    > based FTP server.
    >
    > I am locking down the folder structure in an attempt to keep users from
    > creating tons of oddly named and managed folders. Instead, I would like
    > all new folder to be copies of a template that has the correct folder
    > permissions for each subfolder.
    >
    > In general, this is easy. Use XCOPY, right? Well, I want to be able to
    > do it from a webpage.
    >
    > Can anyone point me in the right direction? I know that
    > System.IO.Directory can create and read directories... but there is
    > nothing there to copy a directory, let alone keep the perms in tact.
    >
    > Thanks
    >
    Jay Douglas, Apr 26, 2005
    #2
    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. darrel
    Replies:
    3
    Views:
    2,311
    Steve C. Orr [MVP, MCSD]
    Jul 23, 2004
  2. Gerry Hickman
    Replies:
    2
    Views:
    1,490
    Gerry Hickman
    Dec 14, 2005
  3. Alex
    Replies:
    2
    Views:
    1,202
  4. Replies:
    26
    Views:
    2,085
    Roland Pibinger
    Sep 1, 2006
  5. blazingwolf7

    Exclude Folders From Being Copy(Ant)

    blazingwolf7, Dec 22, 2008, in forum: Java
    Replies:
    0
    Views:
    1,942
    blazingwolf7
    Dec 22, 2008
Loading...

Share This Page