|
-
Sep 4th, 2005, 09:15 PM
#1
Re: Process multiple Files
lokiloki2,
What is the purpose of this code:
VB Code:
For X = 0 To (List1.ListCount - 1)
List1.ListIndex = X
Next
Last edited by randem; Sep 4th, 2005 at 09:24 PM.
-
Sep 4th, 2005, 09:28 PM
#2
Re: Process multiple Files
This allows you to select multiple filenames to open directly into the CDC.
VB Code:
Private Sub cmdOpen_Click()
' CancelError is True.
On Error GoTo ErrHandler
' Set Flags
CommonDialog1.Flags = cdlOFNAllowMultiselect Or cdlOFNLongNames
' Set filters.
CommonDialog1.Filter = "All Files (*.*)|*.*|Text" & _
"Files (*.txt)|*.txt|Batch Files (*.bat)|*.bat"
' Specify default filter.
CommonDialog1.FilterIndex = 2
' Display the Open dialog box.
CommonDialog1.ShowOpen
' Call the open file procedure.
' OpenFile (CommonDialog1.FileName)
Exit Sub
ErrHandler:
' User pressed Cancel button.
Exit Sub
End Sub
-
Sep 4th, 2005, 11:46 PM
#3
Thread Starter
Junior Member
Re: Process multiple Files
Should not have been in the code. My bad.
If List1.ListCount = 0 Then GoTo ext
-
Sep 4th, 2005, 11:49 PM
#4
Thread Starter
Junior Member
Re: Process multiple Files
Dglienna,
The code you posted, will that run the .exe on each file ?
-
Sep 4th, 2005, 11:54 PM
#5
Thread Starter
Junior Member
Re: Process multiple Files
VB Code:
For X = 0 To (List1.ListCount - 1)
List1.ListIndex = X
Next
Doesn't belong, was testing out some code and forgot to delete this.
-
Sep 5th, 2005, 01:03 AM
#6
Re: Process multiple Files
 Originally Posted by lokiloki2
Dglienna,
The code you posted, will that run the .exe on each file ?
I'm not sure. I think it will open each one in a separate instance. I know that's the case with Word, for instance. I've never really tried to use it.
-
Sep 5th, 2005, 03:33 AM
#7
Thread Starter
Junior Member
Re: Process multiple Files
This will not work.
The exe I run on each file listed in the Listbox produces a checksum that I need to save to a textfile. If multiple files are selected in the CommonDialog, only the last line in the listbox gets processed. I need to process each file if someone selects more than one file.
THX
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
|