Páginas filhas
  • RetFileName - Nome arquivo sem caminho e extensão

Função: RetFileName - Nome arquivo sem caminho e extensão
Versões: Advanced Protheus 5.07 , Advanced Protheus 5.08 , Advanced Protheus 6.09 , Advanced Protheus 7.10 , Microsiga Protheus 8.11 , Protheus 10
Compatível Países: Todos
Sistemas Operacionais: Todos
Compatível às Bases de Dados: Todos
Nível de Acesso: Nível 1 (Acesso Clientes)
Idiomas: Espanhol , Inglês
Descrição:

Retorna nome do arquivo sem caminho e sem extensão.

Programa Fonte:
APLIB070.PRW
Sintaxe:

RetFileName - Nome arquivo sem caminho e extensão ( cArquivo ) --> cRet

Retorno:
    cRet(caracter)
  • Nome do arquivo em caminho e extenção
Exemplos
#include "protheus.ch"User Function TestRetFile()Local cFile Local oDlg                                  Local cRetLocal oPanel1Local oGet, cGet := Space(100)Local oSay1DEFINE MSDIALOG oDlg TITLE "Teste RetFileName" From 000,0 TO 100,300 PIXEL@ 000, 000 MSPANEL oPanel1 SIZE 10, 50 OF oDlg oPanel1:align:= CONTROL_ALIGN_TOP	@ 12, 05 SAY oSay1 VAR "Arquivo: " OF oPanel1 PIXEL                                                                           	@ 12, 30 GET oGet VAR cGet OF oPanel1 SIZE 100,009 PIXEL   	oGet:bLostFocus := {|| (cRet := RetFileName(@cGet), Iif(!Empty(cRet), ApMsgAlert("Nome do Arquivo: " + cRet), )) }			@ 25, 80 BUTTON "Fechar" PIXEL SIZE 40,12 OF oPanel1 ACTION oDlg:End()ACTIVATE MSDIALOG oDlg CENTEREDReturn
Parâmetros:
Nome Tipo Descrição Default Obrigatório Referência
cArquivo Caracter Nome do arquivo X

  • Sem rótulos