this code stripes the folder info. off the whole path so you end up with just the file name.
----------------------
'get just the path from the Acad fullname variable above
For A = 1 To Len(FullPathandDWG)
FindSlash = InStr(A, FullPathandDWG, "\"

If FindSlash = 0 Then Exit For
A = FindSlash
FindSlash1 = FindSlash
Next
JustPath = Left(FullPathandDWG, FindSlash1)
Dwgnum1 = Right(FullPathandDWG, Len(FullPathandDWG) - Len(JustPath))
'trim Off the .dwg on the end
Dwgnum = Left(Dwgnum1, Len(Dwgnum1) - 4)
------------
this is for autoCAD drawings but it will work for any files
DougP, MCP
Visit my WEB site
to see how Bar-codes can help you be more productive