Results 1 to 7 of 7

Thread: [Resolved] Put all files into one map

  1. #1

    Thread Starter
    Addicted Member Rogier's Avatar
    Join Date
    Jun 2004
    Location
    Netherlands
    Posts
    143

    Exclamation [Resolved] Put all files into one map

    Hi!

    I have a map, wich have a lot of sub-maps. (in the submaps are a lot of files)
    Now I can open all sub-maps and cut all files and past it in the main map, but if I have 100 sub-maps so thats gonna take weeks.

    So thats why I want to make a little program that pasts all files in the main map.

    Any ideas?

    Thanks!
    Last edited by Rogier; Apr 22nd, 2006 at 09:00 AM. Reason: Resolved

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Put all files into one map

    You can use the paintpicture method of the picture box to paint all your submaps in a specific location on a picturebox, and then save that as one picture.

  3. #3

    Thread Starter
    Addicted Member Rogier's Avatar
    Join Date
    Jun 2004
    Location
    Netherlands
    Posts
    143

    Re: Put all files into one map

    Huh? I'm pretty a n00b....
    I don't want a picture

  4. #4

  5. #5

    Thread Starter
    Addicted Member Rogier's Avatar
    Join Date
    Jun 2004
    Location
    Netherlands
    Posts
    143

    Re: Put all files into one map

    ok, woops, my fault.

    With a map I mean a FOLDER where you can put files in.

    Sorry!

  6. #6
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Put all files into one map

    VB Code:
    1. Private Sub Command1_Click()
    2.     Dim sMainFol As String, sCurDir As String, sFile As String
    3.     Dim colFolders As New Collection
    4.    
    5.     sMainFol = "C:\New Folder\" 'Remember to include \
    6.     colFolders.Add sMainFol
    7.    
    8.     Do While colFolders.Count
    9.         sCurDir = colFolders.Item(1)
    10.         colFolders.Remove 1
    11.        
    12.         sFile = Dir$(sCurDir, vbDirectory)
    13.         Do While Len(sFile)
    14.             If Not (sFile = "." Or sFile = "..") Then
    15.                 If (GetAttr(sCurDir & sFile) Or vbDirectory) = vbDirectory Then
    16.                     colFolders.Add sCurDir & sFile & "\"
    17.                 Else
    18.                     ' To Move the file:
    19.                     'Name sCurDir & sFile As sMainFol & sFile
    20.                    
    21.                     ' To Copy
    22.                     FileCopy sCurDir & sFile, sMainFol & sFile
    23.                 End If
    24.             End If
    25.             sFile = Dir
    26.         Loop
    27.     Loop
    28. End Sub
    I've tested it, but make sure you do too

  7. #7

    Thread Starter
    Addicted Member Rogier's Avatar
    Join Date
    Jun 2004
    Location
    Netherlands
    Posts
    143

    Re: Put all files into one map

    You're GREAT!!

    It works perfectly!

    Thank you very much!

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