program Use_LongNum;
uses LongNum;

var fn1, fn2: string;
    f1, f2: BFile;
        
begin
if ParamCount > 0 then begin
   fn1 := ParamStr(1);
   fn2 := ParamStr(2);
   if fn2 = '' then fn2 := fn1; 
end else begin
  writeln('Introdu numele fisierului textual!');
  readln(fn1);
  writeln('Introdu numele fisierului destinatie!');
  readln(fn2);
end;
   if not (fileExists(fn1)and fileExists(fn2)) then exit;
   if fn1 = fn2 then begin
      assign(f1,fn1);
      tempFile(f2);
      fDec2Bin(f1, f2);
      copyFile(f2, f1);
      close(f2);
      erase(f2);
   end else begin
      assign(f1,fn1);
      assign(f2,fn2);
      fDec2Bin(f1, f2);
   end;
   
end.
