Hola compañeros, descubri el problema que tenia, resulta que si las rutas de orige o destino tiene espacios en blanco, debe ir entre comillas dobles. el código queda de la siguiente manera
Código Delphi
[-]procedure TForm1.Button3Click(Sender: TObject);
var
lpOperation, lpFile, lpParameters, lpDirectory: PChar;
varbPasado:Boolean;
begin
varbPasado:=False;
if not FileExists(Edit3.Text+'.FBK') then
with TPanel.Create(nil) do
try
Caption:= 'Realizando copia de seguridad, aguarde un momento por favor...';
Font.Size:= 14;
Font.Name:= 'Arial';
Width:= 600;
Height:= 70;
Left:= (Self.ClientWidth - Width) div 2;
Top:= (Self.ClientHeight - Height) div 2;
BevelInner:= bvNone;
BevelOuter:= bvNone;
BevelWidth:= 1;
BorderStyle:= bsSingle;
Ctl3D:= False;
Parent:= Self;
lpOperation:= 'open';
lpFile:= 'gbak.exe';
Edit1.Text:= '"'+Edit1.Text + '" ';
lpParameters:= PChar('-v -t -user SYSDBA -password "masterkey" '+
Edit1.Text +'"'+Edit2.Text+'"');
lpDirectory:= PChar(GetEnvironmentVariable('ProgramFiles')+'\Firebird\Firebird_2_1\bin');
Memo1.Lines.Clear;
Memo1.Lines.Add(lpParameters);
ShellExecute(Handle, lpOperation, lpFile, lpParameters, lpDirectory, SW_HIDE);
varbPasado:=true
finally
if varbPasado=true then ShowMessage('Proceso terminado')
else ShowMessage('El fichero ya existe');
Free;
end;
end;
Ahora abusando un poco, es logico que pase según mis pruebade de 125 Mb a 8.90 y de 3.40 Mb a 28.5K
y por último cual seria la sentencia correcta para una restauración.
Muchas gracias por ser siempre tan atento ecfisa