dataport

pilar_martinezpilar_martinez Member Posts: 5
Hi,

I need know how to do to recover the name of a file without the path of location of the same one

Thanks

Comments

  • Alex_ChowAlex_Chow Member Posts: 5,063
    Hi,

    I need know how to do to recover the name of a file without the path of location of the same one

    Thanks

    What do you mean by:
    "recover the name of a file without the path of location of the same one" :?:
  • slmaluwaslmaluwa Member Posts: 366
    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?
    "A bove maiore discit arare minor"-"From the old ox, the young one learns to plow."
  • raven44raven44 Member Posts: 85
    REPEAT
    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.
  • pilar_martinezpilar_martinez Member Posts: 5
    Yes, about the path:C:\WINDOWS\System32\Somelogs\file.log
    I need only file.log

    What instruction I need to use about this?

    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?
Sign In or Register to comment.