Results 1 to 5 of 5

Thread: directories and files

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    directories and files

    hi there.

    I thought i had this working but apperently not, i need to create folders (and subfolders in those folders) and copy files from them to a destination

    how can i do this? I know there is a class in .NET where i can create/remove/copy files/folders but how do i create the subdirs in the "current" folder?

    so for each folder there is in current directory, copy files in it, create the sub dirs, go into it, copy files.....and so on...

  2. #2
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    Re: directories and files

    Check out the System.IO.File and System.IO.Directory classes.

    Cheers,
    NTG
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

  3. #3
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: directories and files

    It might be easier for you to create the directory structure by only creating the deepest folders. This will automatically create all the folders above them.

    Just a thought.



    VB Code:
    1. io.Directory.CreateDirectory(CurrentDirectoryPath & "\Subfolder name")
    I don't live here any more.

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: directories and files

    i know about that but i am wondering how you would go about creating and copying files on the fly (I know Directory.create/file.copy()) until there are no more files/dirs to create/copy...

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: directories and files

    i really need help, i cant get it to work

    i need to copy all files and folders from the folder(s) specified to copy the stuff from

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width