a$=CurrentDir$
a=Len(a$)
try brackets.. CurrentDir$()
iirc there's a bug in CurrentDir$(). Dunno why it hasn't been fixed yet..
When I run my apps in the IDE, then the command seems to work fine, but when I make an .exe of the same file, then it could be that I end-up in C:\My Documents\ for some odd reason..