'Supply the name of a file you hope is in the IE cache.
'This script will return the full path or an empty string.

Option Explicit

Main

Sub Main()
Dim wsh, fso, strFilePath, strFileName
    'Create needed objects (even though we only use each one once).
    Set wsh = CreateObject("Wscript.Shell")
    Set fso = CreateObject("Scripting.FileSystemObject")
    'Get the file name we want to search for.
    If WScript.Arguments.Count = 1 Then
        strFileName = WScript.Arguments(0)
    Else
        strFileName = InputBox("Enter the name of a file you'd like to locate in your cache.", "File Name", "")
    End If
    'Exit if the user hit;s the Cancel button.
    If strFileName = "" Then Exit Sub
    'Cache files generally have "[1]" inserted just before the file extension.
    If InStr(strFileName, "].") = 0 Then
        strFileName = Left(strFileName, InStrRev(strFileName, ".") - 1) & "[1]" & Mid(strFileName, InStrRev(strFileName, "."))
    End If
    'Start building the file path by getting the basic path
    strFilePath = wsh.Environment("PROCESS")("USERPROFILE")
    strFilePath = strFilePath & "\Local Settings\Temporary Internet Files\"
    'Now search the possible paths for the desired file
    strFilePath = SearchForFile(fso.GetFolder(strFilePath), strFileName)
    'Done! Display the result
    MsgBox strFilePath
End Sub

Function SearchForFile(objFolder, strFile)
Dim fils, fil, fols, fol, strFilePath
    'Check all the files in the current folder
    On Error Resume Next
    Set fils = objFolder.Files
    If Err.Number = 0 Then
        For Each fil In fils
            If fil.Name = strFile Then
                SearchForFile = fil.Path
                Exit Function
            End If
        Next
    End If
    'Check for any sub folders and recursively search them
    Set fols = objFolder.SubFolders
    For each fol in fols
        strFilePath = ""
        strFilePath = SearchForFile(fol, strFile)
        If strFilePath <> "" Then
            SearchForFile = strFilePath
            Exit Function
        End If
    Next
    SearchForFile = strFilePath
End Function
