06-07-2011, 03:32 PM
(This post was last modified: 06-07-2011, 03:36 PM by surya_7mar.)
Code:
sFolderName = "c:\foldername"
Set fso = CreateObject("Scripting.FileSystemObject")
If Not fso.FolderExists(sFolderName) Then
Reporter.ReportEvent micWarning, "Unable to Get The Files", "Unable to get the File from the location "&sFolderName&". This may be due to the wrong foldername. Looking for. "
End If
Set fBefore = fso.GetFolder(sFolderName)
Set fcBefore = fBefore.Files
For each fb in fcBefore
If Left(fb.Name, 4) = "clip" and Right(fb.Name,4) = ".mp4" Then
print fb.Name
End If
Next
This will print all the files in a folder where file name starts with "clip" and endd with ".mp4"
This will print all the files in folder where the file name starts with "clip" and ends with ".mp4"
Code:
sFolderName = "c:\foldername"
Set fso = CreateObject("Scripting.FileSystemObject")
Set fBefore = fso.GetFolder(sFolderName)
Set fcBefore = fBefore.Files
For each fb in fcBefore
If Left(fb.Name, 4) = "clip" and Right(fb.Name, 4) = ".mp4" Then
print fb.Name
End If
Next
THis will print all the files in a folder starts wirh clip and ends with .mp4
Code:
sFolderName = "c:\foldername"
Set fso = CreateObject("Scripting.FileSystemObject")
Set fBefore = fso.GetFolder(sFolderName)
Set fcBefore = fBefore.Files
For each fb in fcBefore
If Left(fb.Name, 4) = "clip" and Right(fb.Name, 4) = ".mp4" Then
print fb.Name
End If
Next
This will print all the files in folder where the file name starts with "clip" and ends with ".mp4"
Code:
sFolderName = "c:\foldername"
Set fso = CreateObject("Scripting.FileSystemObject")
Set fBefore = fso.GetFolder(sFolderName)
Set fcBefore = fBefore.Files
For each fb in fcBefore
If Left(fb.Name, 4) = "clip" and Right(fb.Name, 4) = ".mp4" Then
print fb.Name
End If
Next
--------------------------------------------------------------------------------