Function FileNameInParentDir(strFileName) 'As String 'Returns the complete path and file name to a file in 'the script directory. For example, "trans.log" might 'return "C:\Program Files\Scripts\Database\trans.log" 'if the script was in the "C:\Program Files\Scripts\Database" 'directory. Dim fs 'As Object Set fs = CreateObject("Scripting.FileSystemObject") 'FileNameInParentDir = fs.GetParentFolderName(fs.GetParentFolderName(Wscript.ScriptFullName)) & "\" & strFileName FileNameInParentDir = fs.GetAbsolutePathName(fs.BuildPath(Wscript.ScriptFullName, "..\..\" & strFileName)) End Function