Subj : Re: The first argument To : borland.public.cpp.borlandcpp From : "paul" Date : Fri Nov 14 2003 11:58 am Use strrchr to find the last backslash character. Bump the pointer by one. You are now at the point where the program name begins. Paul "Graf László" wrote in message news:3fb4aa03@newsgroups.borland.com... > Hi > > Short question from a beginner: > > I have a short (very simple program) p01.exe in C:\. > This line > printf("\n%s\n", argv[0]); > displays > c:\p01.exe > How could I display the program's name only (p01.exe) ? > > Laci > .