Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

FileNoExt

FileNoExt( <cArquivo> )

Returns a file path/name without its extension.

FilesStringUtility
01 · OVERVIEW

Overview

FileNoExt() removes the extension from the informed file name while preserving the remaining path when it exists.

02 · SYNTAX

Syntax

FileNoExt( <cArquivo> )

Parameters

cFile
CharacterRequired

File path and/or name.

03 · PRACTICAL EXAMPLE

Removing extension

#Include "TOTVS.ch"

User Function ExFileNoExt()
    Local cArquivo := "\SIGAADV\ARQZZZ.DBF"

    MsgInfo(FileNoExt(cArquivo)) // \SIGAADV\ARQZZZ
Return
Expected result

The .DBF extension is removed and the path is preserved.

BEST PRACTICES
  • Use quando precisar manipular o nome base mantendo o caminho original.
  • Para obter apenas o nome sem caminho e sem extensão, veja RetFileName().

Related content

REFERENCES
  1. Help ADVPL.chm. Help AdvPL/APMSLib, documentação oficial histórica, 15 mar. 2004. Conteúdo resumido, reorganizado e marcado para revisão contra documentação atual da TOTVS quando disponível.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha