|
-
Nov 11th, 2003, 03:22 PM
#1
Thread Starter
New Member
Shelling multiple files (resolved!)
I'm not sure if this is my first post or not... I've been digging through 1000's of post's and answered all of my questions so far. I think i'm just too tired to answer this one!!!
I want to be able to shell multiple files. I can open a dialog.showopen box and select multiple files. (When they are selected in the bottom box they all have "" around them).
I want to be able to shell them file by file, all in different instances. My program works for one file just fine, but in the name of lazyness i'd like to do multiple files.
An example would be that i selected multiple .txt files and i just want to open each of them. Here's what i've got so far... I think i could cut some of it out, but i'm very new and i've hacked most of this up as best i can.
VB Code:
Private Sub browseMP2File_Click()
WorkDir = GetSetting(App.EXEName, "FilePaths", "WorkDir", "")
With MP2Dialog
.FileName = ""
.DefaultExt = ".mp2"
.DialogTitle = "Select File(s)..."
.Filter = "MP2 Audio Files (*.mp2)|*.mp2|MP2 and MP3 Files (.mp2 & .mp3)|*.mp*|All Files (*.*)|*.*"
.InitDir = WorkDir
.CancelError = True
On Error Resume Next
End With
With MP2Dialog
.Flags = cdlOFNAllowMultiselect Or cdlOFNExplorer Or cdlOFNNoChangeDir Or cdlOFNNoDereferenceLinks Or cdlOFNFileMustExist
.ShowOpen
MP2File = MP2Dialog.FileName
MP2Text.Text = MP2File
If Err > 0 Then 'Cancel was selected
If Err = cdlCancel Then
Exit Sub
End If
'some other error occured, deal with it here!
End If
End With
End Sub
Also, i want to set the WorkDir variable to a folder by browsing for the folder. I know how to browse for a file, but not a folder. Any Suggestions? Thanks!
Last edited by ecpunk; Nov 13th, 2003 at 01:25 PM.
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
|