I don't know Pascal, but VFP does not support GOTO either a line number or line label. The following code probably violates some programming standards about DO WHILE .T. with LOOP and EXIT, but should have the virtue of doing what you need (at least what I think you are asking for)
IF FILE (bkpc_path)
caminho_rest = bkpc_path
ELSE
DO WHILE .T.
dire1 = GETDIR("C:\" , [choose folder], [Seleção], 1)
IF NOT FILE (dire1 + thisform.text2.Value)
= MESSAGEBOX ("O arquivo não encontra no local selecionado. Selecione outro local")
THISFORM.LABEL1.Visible = .F.
THISFORM.COMMAND3.ENABLED = .T.
THISFORM.COMMAND5.ENABLED = .T.
thisform.refresh
LOOP
ELSE
EXIT
ENDIF
ENDDO
caminho_rest = dire1 + thisform.text2.Value
ENDIF
I'm making the assumption that were you have RETURN coded, that is where you want to go back and reissue the GETDIR() command.
Be aware that this will create an endless loop until you enter a legal value. I also don't think it's correct to set the properties, but I don't know your requirements and I've replicated your intentions as best I can determine them.
>How can I mark and then return to a line of my VFP program as we do in Pascal ?
>
>FOR exemple, in the program below I would like to go back to line LINE 4,
>in case NOT FILE (LINE 7)
>
>*********************************************
>IF FILE (bkpc_path)
> caminho_rest = bkpc_path
>
> else
>dire1 = GETDIR("C:\" , [choose folder], [Seleção], 1) && LINE 4
> caminho_rest = dire1 + thisform.text2.Value
>
>
> DO CASE
>
> CASE NOT FILE (dire1 + thisform.text2.Value) && LINE 7
>
> = MESSAGEBOX ("O arquivo não encontra no local selecionado. Selecione outro local")
>
> THISFORM.LABEL1.Visible = .F.
> THISFORM.COMMAND3.ENABLED = .T.
> THISFORM.COMMAND5.ENABLED = .T.
> thisform.refresh
>
>
> RETURN
>
> OTHERWISE
> endcase
>
> ENDIF
>***************************************************