Results 1 to 7 of 7

Thread: Shelling multiple files (resolved!)

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Location
    Heiligenmoschel Germany
    Posts
    10

    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:
    1. Private Sub browseMP2File_Click()
    2.     WorkDir = GetSetting(App.EXEName, "FilePaths", "WorkDir", "")
    3.     With MP2Dialog
    4.       .FileName = ""
    5.       .DefaultExt = ".mp2"
    6.       .DialogTitle = "Select File(s)..."
    7.       .Filter = "MP2 Audio Files (*.mp2)|*.mp2|MP2 and MP3 Files (.mp2 & .mp3)|*.mp*|All Files (*.*)|*.*"
    8.       .InitDir = WorkDir
    9.       .CancelError = True
    10.       On Error Resume Next
    11.     End With
    12.    
    13.     With MP2Dialog
    14.       .Flags = cdlOFNAllowMultiselect Or cdlOFNExplorer Or cdlOFNNoChangeDir Or cdlOFNNoDereferenceLinks Or cdlOFNFileMustExist
    15.       .ShowOpen
    16.    
    17.     MP2File = MP2Dialog.FileName
    18.     MP2Text.Text = MP2File
    19.  
    20. If Err > 0 Then  'Cancel was selected
    21.      If Err = cdlCancel Then
    22.        Exit Sub
    23.      End If
    24.     'some other error occured, deal with it here!
    25.    End If
    26.  End With
    27. 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
  •  



Click Here to Expand Forum to Full Width