|
-
Apr 22nd, 2006, 07:16 AM
#1
Thread Starter
Addicted Member
[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
-
Apr 22nd, 2006, 07:43 AM
#2
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.
-
Apr 22nd, 2006, 07:54 AM
#3
Thread Starter
Addicted Member
Re: Put all files into one map
Huh? I'm pretty a n00b....
I don't want a picture
-
Apr 22nd, 2006, 07:56 AM
#4
Re: Put all files into one map
what is a map if it's not a picture?
-
Apr 22nd, 2006, 07:58 AM
#5
Thread Starter
Addicted Member
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!
-
Apr 22nd, 2006, 08:33 AM
#6
Re: Put all files into one map
VB Code:
Private Sub Command1_Click()
Dim sMainFol As String, sCurDir As String, sFile As String
Dim colFolders As New Collection
sMainFol = "C:\New Folder\" 'Remember to include \
colFolders.Add sMainFol
Do While colFolders.Count
sCurDir = colFolders.Item(1)
colFolders.Remove 1
sFile = Dir$(sCurDir, vbDirectory)
Do While Len(sFile)
If Not (sFile = "." Or sFile = "..") Then
If (GetAttr(sCurDir & sFile) Or vbDirectory) = vbDirectory Then
colFolders.Add sCurDir & sFile & "\"
Else
' To Move the file:
'Name sCurDir & sFile As sMainFol & sFile
' To Copy
FileCopy sCurDir & sFile, sMainFol & sFile
End If
End If
sFile = Dir
Loop
Loop
End Sub
I've tested it, but make sure you do too
-
Apr 22nd, 2006, 08:59 AM
#7
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|