%lsPath = Request.ServerVariables("SCRIPT_NAME") 'Split the path along the /s. This creates a one-dimensional array arPath = Split(lsPath, "/") 'The last item in the array contains the file name getFileName = arPath(UBound(arPath,1)) %>