I have another question about this. It's probably better to aks it here than to make a new thread about it.
This is the code I'm using now. It's a modified version of the code above to only check if the file is a valid AVI file:
Globals.SelectedFile is a filepath.
VB Code:
Public Function GetFileType(xFile As String) As String On Error Resume Next Dim ID As String * 300 Open xFile For Binary Access Read As #1 Get #1, 1, ID Close #1 If Mid(ID, 9, 8) = "AVI LIST" Then MsgBox "This is an AVI file" Else MsgBox "This is NOT an AVI file" Exit Function End If End Function Private Sub Form_Load() GetFileType (Globals.SelectedFile) End Sub
When I right-click on one AVI and run the application (from the Explorer right-click menu), then it works fine. But when I highlight multiple AVI files, right-click on them and run the application, then it always returns "This is NOT an AVI file", because it can only read one AVI file at a time.
Is there a way to check file 1 first, then file 2, then file 3, etc?
Like a batch process.




Reply With Quote