It looks like you're new here. Sign in or register to get started.
pilar_martinez wrote: Hi, I need know how to do to recover the name of a file without the path of location of the same one Thanks
slmaluwa wrote: Hope he is asking "How to get only the file name from the full path + file name" ?? Eg: C:\WINDOWS\System32\Somelogs\file.log He is trying to get only the "file.log" part. Am I correct pilar_martinez?
Comments
What do you mean by:
"recover the name of a file without the path of location of the same one" :?:
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Eg:
C:\WINDOWS\System32\Somelogs\file.log
He is trying to get only the "file.log" part.
Am I correct pilar_martinez?
TheFileName := DELSTR(TheFileName,1,STRPOS(TheFileName'\'));
UNTIL STRPOS(TheFileName,'\') = 0;
not the best coding practise, therefore you may just want to use another variable in order not to overwrite your actual Filepath and so forth.
I need only file.log
What instruction I need to use about this?
Thanks,