Ver Mensaje Individual
  #15  
Antiguo 25-09-2018
Missael Missael is offline
Miembro
NULL
 
Registrado: sep 2018
Posts: 37
Reputación: 0
Missael Va por buen camino
Código Delphi [-]
procedure TForm2.UploadClick(Sender: TObject);
begin
  time := milli(Now);
  times := IntToStr(time);
  //ShowMessage('19'+times);
  path := ''+Choose+'\exportGeneralInstructions'+fileName+'\qcExcel\'+json+'\productReport\';
  if (FindFirst(path + '*' , faArchive, sr )  and FindFirst(path + '*' , faDirectory, sr )) = 0 then
  begin
  repeat
    //if (sr.Attr and faArchive) = faArchive then
      ShowMessage('File Name: '+ sr.Name);
      if DirectoryExists(sr.name) then
      else
      begin
        path := path + sr.Name; 
      end;

  until FindNext(sr) <> 0;

  end
  else
    begin
    ShowMessage('Files not found');
    end;
    FindClose(sr);
    res := '{"localid":"15'+times+'-'+path+'\","deviceid":"windowsapp","createddate":15'+times+',"userid":0,"qaqcid":'+json+'}';
end;

Tengo eso, ahorita lo que estoy haciendo (no se si sea lo correcto) es agregar al path el nombre de la carpeta, de ahi seguir inspeccionando una por una, hacer un ciclo, que lo haga hasta que ya no encuentre carpetas por revisar
Choose: es la direccion que escoge el usuario a guardar sus archivos que se descomprimen automaticamente

los otros valores son de un json.
Responder Con Cita