VideoEdit Gold ActiveX Control

IsFileExisting Method

Description

Checking the media file whether existing.

Syntax

Public Function IsFileExisting ( _
   ByVal strFile as string
) As Bool

Parameters

strFile
    the path of media file.

Return Value

Return true if the media is existing, otherwise return false.
 

Example

[Visual Basic Script Syntax]
Set obj=CreateObject("VIDEOEDIT.VideoEditCtrl.1")
obj.InitSingleServerLicense "demo"
strVideoFile= InputBox("Please input the file path of video e.g. c:\video.mpg")
if obj.IsFileExisting (strVideoFile) = false then
  Msgbox "Make sure the video file is existing"
  WScript.Quit
end if
iDur=obj.GetFileDuration(strVideoFile)
if iDur=0 then
  msgbox "Video File not found, please input correct path"
  WScript.Quit
end if
obj.NoUIVideoWndCaption "Converting"
obj.OutputType=0
obj.VideoSampleSize = 24
obj.InitControl
obj.AddVideo strVideoFile, 0, iDur, 0
obj.AddAudio strVideoFile, 0, iDur
result = obj.Save ("c:\mytest1.mpg")
If result= true Then
 MsgBox "Save c:\mytest1.mpg completed"
else
 MsgBox "Failed"
End If