Results 1 to 3 of 3

Thread: automatically create directories and move files

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Location
    Hong Kong
    Posts
    62

    Question

    Hi,
    I'm using VB6 SP3 on an NT 4. I need to create 100 directories. The names of these directories can be just Dir001, Dir002, Dir003, .........., Dir099, Dir100. How can I create them automatically?
    After that I've to move around 8,000 files into these directories according to their filenames. How can I do this using VB? thanks you very much!!
    Please Visit My WebCam!!
    http://www.hmcheung.com

  2. #2
    Member
    Join Date
    Jun 2000
    Location
    North of France
    Posts
    49

    Lightbulb

    For directories, i think it's easy but to tidy your files, i don't know yet!

    for your directories, try this:

    Code:
    Dim Index as Integer
    
    For Index=1 To 100
      If Index<10 Then
          Mkdir ("Dir0" & Index)
      Else: MkDir ("Dir" & Index)
      End If
    Next
    How do you want to tidy your files (in relation to the directories ?

    [Edited by (B2F)Tom on 07-11-2000 at 05:13 AM]
    Hi-Tech Engineer

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2000
    Location
    Hong Kong
    Posts
    62

    Thumbs up

    Oh thanks!
    I'm able to create the directories.
    and I think i'll be able to manage the files using to FileCopy Statement. Thanks for your help!
    Please Visit My WebCam!!
    http://www.hmcheung.com

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