X1=Len(FILENAME$) CHECK: If Mid$(FILENAME$,X1,1)="/" : Rem directory L=((Len(FILENAME$))-X1) TMP$=Mid$(FILENAME$,X1+1,L) Goto OUT End If If Mid$(FILENAME$,X1,1)=":" : Rem drive specifier L=((Len(FILENAME$))-X1) TMP$=Mid$(FILENAME$,X1+1,L) Goto OUT End If If X1=0 L=((Len(FILENAME$))-X1) TMP$=Mid$(FILENAME$,X1+1,L) Goto OUT End If Dec X1 Goto CHECK OUT: ' ' when the program reaches this point, it will have just the name ' of the file hel in tmp$. All the drive data & directory paths have ' been removed '