I'm having trouble understanding exactly where something comes from. Consider the bit of script below. Who decided to use oFile in the loop and why choose oFile?
[code=vb]
Set oFSO = WScript.CreateO bject("Scriptin g.FileSystemObj ect")
sPath = InputBox("Provi de starting folder path")
Set oFolder = oFSO.GetFolder( sPath)
If oFSO.FolderExis ts(sPath) Then
For Each oFile in oFolder.Files
Msgbox "File " & oFile.Name & " last changed on on " & _
oFile.DateLastM odified & " and of type " & _
oFile.Type & ". It is contained in folder " & _
oFile.ParentFol der.Path & " and uses the short " & _
" filename " & oFile.Shortname & "."
Next
End If
[/code]
[code=vb]
Set oFSO = WScript.CreateO bject("Scriptin g.FileSystemObj ect")
sPath = InputBox("Provi de starting folder path")
Set oFolder = oFSO.GetFolder( sPath)
If oFSO.FolderExis ts(sPath) Then
For Each oFile in oFolder.Files
Msgbox "File " & oFile.Name & " last changed on on " & _
oFile.DateLastM odified & " and of type " & _
oFile.Type & ". It is contained in folder " & _
oFile.ParentFol der.Path & " and uses the short " & _
" filename " & oFile.Shortname & "."
Next
End If
[/code]
Comment