UNKNOWN '************************************** ' Name: Detect "\" in directory ' Description:Suppose You try to get the ' app.path when the app is in the C Drive. ' the result is "C:\". if the app is in an ' other directory the result may be "C:\Di ' rectory". notice there is no backslash. ' most people skip this because they don't ' think it is a problem, but it is. when y ' ou put in a program, app.path & "\filena ' me.file", when it is in the C Drive or i ' f you put app.path & "filename.file" in ' a named directory, the computer will eit ' her return "C:\\filename.file" or "C:\Di ' rectoryfilename.file". this code will sh ' ow you how to detect the backslash and d ' eal with it. ' By: Eric LeBourgeois ' ' ' Inputs:None ' ' Returns:None ' 'Assumes:None ' 'Side Effects:None 'This code is copyrighted and has limite ' d warranties. 'Please see http://www.Planet-Source-Cod ' e.com/xq/ASP/txtCodeId.10775/lngWId.1/qx ' /vb/scripts/ShowCode.htm 'for details. '************************************** 'this code will give you a valid filenam ' e, whether the app.path return has a bac ' kslash or not, and displays a message bo ' x. 'Please Vote for me at Planet Source Cod ' e if right(app.path,1) = "\" then 'sees if the directory has a backslash at the end of it msgbox app.path & "filename.file" goto ResumeMe end if msgbox app.path & "\filename.file" ResumeMe: