Copia com barra de progresso.

Projeto [x]Harbour - Compilador de código aberto compatível com o Clipper.

Moderador: Moderadores

alxsts
Colaborador
Colaborador
Mensagens: 3092
Registrado em: 12 Ago 2008 15:50
Localização: São Paulo-SP-Brasil

Copia com barra de progresso.

Mensagem por alxsts »

Olá!

O código fonte da função encontra-se no 4º post deste tópico, postado pelo Itamar M. Lins Jr. É só copiar, colar e compilar, após alterar o tamanho do buffer. Eu colocaria 65535 (64 kb). Cada cluster no NTFS ocupa 4096 bytes. Com 64 Kb, leria 16 clusters por vez, agilizando o processo pela diminuição da quantidade de operações de leitura.
[]´s
Alexandre Santos (AlxSts)
Avatar do usuário
Itamar M. Lins Jr.
Administrador
Administrador
Mensagens: 7929
Registrado em: 30 Mai 2007 11:31
Localização: Ilheus Bahia
Curtiu: 1 vez

Copia com barra de progresso.

Mensagem por Itamar M. Lins Jr. »

Eu coloquei o post quanto a demora, no forum de desenvolvedores, quem sabe o Viktor faça alguns ajustes, de acordo com o OS, 32,64 NTFS, FATX etc...

Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
cjp
Usuário Nível 6
Usuário Nível 6
Mensagens: 1563
Registrado em: 19 Nov 2010 22:29
Localização: paraná
Contato:

Copia com barra de progresso.

Mensagem por cjp »

Alexandre, salvo engano, o que eu preciso é o xhbcopyf.c, não o fonte da função, estou correto?
Inacio de Carvalho Neto
alxsts
Colaborador
Colaborador
Mensagens: 3092
Registrado em: 12 Ago 2008 15:50
Localização: São Paulo-SP-Brasil

Copia com barra de progresso.

Mensagem por alxsts »

Olá!

No post que citei tem o fonte da função (xhbcopyf.c). Nunca fiz isso mas, de alguma forma, tem-se que seguir o que o Toledo indicou acima:

- descobrir em qual lib está essa função (xhbcopyf.c)
- localizar todos os arquivos include (*.h)
- salvar o fonte alterado da função na pasta contrib referente à lib (na pasta contrib que tenho não tem nenhum arquivo .c)
- gerar uma nova versão da lib, com a função alterada.

Vamos aguardar a intervenção de alguém com conhecimento nisto.
[]´s
Alexandre Santos (AlxSts)
Avatar do usuário
Itamar M. Lins Jr.
Administrador
Administrador
Mensagens: 7929
Registrado em: 30 Mai 2007 11:31
Localização: Ilheus Bahia
Curtiu: 1 vez

Copia com barra de progresso.

Mensagem por Itamar M. Lins Jr. »

Pronto!
Favor testar ai novamente.
* contrib/xhb/xhbcopyf.c
* src/rtl/copyfile.c
% __COPYFILE()/XHB_COPYFILE() updated to use the same
buffer sizes as HB_FCOPY(). It may result in significant
speed up, especially on non-local drives.
Notice that in XHB_COPYFILE() the progress block is
called 8 times less frequently than before.
Agora essas modificações, estão no GIT do Viktor.

Código: Selecionar todos

/*
 * Harbour Project source code:
 * xhb_CopyFile() function
 *
 * Copyright 1999 Andi Jahja <andij@aonlippo.co.id>
 * www - http://harbour-project.org
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this software; see the file COPYING.txt.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307 USA (or visit the web site https://www.gnu.org/).
 *
 * As a special exception, the Harbour Project gives permission for
 * additional uses of the text contained in its release of Harbour.
 *
 * The exception is that, if you link the Harbour libraries with other
 * files to produce an executable, this does not by itself cause the
 * resulting executable to be covered by the GNU General Public License.
 * Your use of that executable is in no way restricted on account of
 * linking the Harbour library code into it.
 *
 * This exception does not however invalidate any other reasons why
 * the executable file might be covered by the GNU General Public License.
 *
 * This exception applies only to the code released by the Harbour
 * Project under the name Harbour.  If you copy code from other
 * Harbour Project or Free Software Foundation releases into a copy of
 * Harbour, as the General Public License permits, the exception does
 * not apply to the code that you add in this way.  To avoid misleading
 * anyone as to the status of such modified files, you must delete
 * this exception notice from them.
 *
 * If you write modifications of your own for Harbour, it is your choice
 * whether to permit this exception to apply to your modifications.
 * If you do not wish that, delete this exception notice.
 *
 */

#include "hbapi.h"
#include "hbapierr.h"
#include "hbapifs.h"
#include "hbapiitm.h"
#include "hbvm.h"

#if defined( HB_OS_UNIX )
   #include <sys/stat.h>
   #include <unistd.h>
#endif

#define BUFFER_SIZE  65536

static HB_BOOL hb_copyfile( const char * szSource, const char * szDest, PHB_ITEM pBlock )
{
   HB_BOOL    bRetVal = HB_FALSE;
   HB_FHANDLE fhndSource;

   HB_TRACE( HB_TR_DEBUG, ( "hb_copyfile(%s, %s)", szSource, szDest ) );

   while( ( fhndSource = hb_spOpen( szSource, FO_READ | FO_SHARED | FO_PRIVATE ) ) == FS_ERROR )
   {
      HB_USHORT uiAction = hb_errRT_BASE_Ext1( EG_OPEN, 2012, NULL, szSource, hb_fsError(), EF_CANDEFAULT | EF_CANRETRY, 0 );

      if( uiAction != E_RETRY )
         break;
   }

   if( fhndSource != FS_ERROR )
   {
      HB_FHANDLE fhndDest;

      while( ( fhndDest = hb_spCreate( szDest, FC_NORMAL ) ) == FS_ERROR )
      {
         HB_USHORT uiAction = hb_errRT_BASE_Ext1( EG_CREATE, 2012, NULL, szDest, hb_fsError(), EF_CANDEFAULT | EF_CANRETRY, 0 );

         if( uiAction != E_RETRY )
            break;
      }

      if( fhndDest != FS_ERROR )
      {
#if defined( HB_OS_UNIX )
         struct stat struFileInfo;
         int         iSuccess = fstat( fhndSource, &struFileInfo );
#endif
         HB_BYTE * buffer = ( HB_BYTE * ) hb_xgrab( BUFFER_SIZE );
         HB_SIZE nRead;

         bRetVal = HB_TRUE;

         if( hb_itemType( pBlock ) != HB_IT_BLOCK )
            pBlock = NULL;

         while( ( nRead = hb_fsReadLarge( fhndSource, buffer, BUFFER_SIZE ) ) != 0 )
         {
            while( hb_fsWriteLarge( fhndDest, buffer, nRead ) != nRead )
            {
               HB_USHORT uiAction = hb_errRT_BASE_Ext1( EG_WRITE, 2016, NULL, szDest, hb_fsError(), EF_CANDEFAULT | EF_CANRETRY, 0 );

               if( uiAction != E_RETRY )
               {
                  bRetVal = HB_FALSE;
                  break;
               }
            }

            if( pBlock )
            {
               PHB_ITEM pCnt = hb_itemPutNS( NULL, nRead );

               hb_vmEvalBlockV( pBlock, 1, pCnt );

               hb_itemRelease( pCnt );
            }
         }

         hb_xfree( buffer );

#if defined( HB_OS_UNIX )
         if( iSuccess == 0 )
            fchmod( fhndDest, struFileInfo.st_mode );
#endif

         hb_fsClose( fhndDest );
      }

      hb_fsClose( fhndSource );
   }

   return bRetVal;
}

/* Clipper returns .F. on failure and NIL on success */

HB_FUNC( XHB_COPYFILE )
{
   if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) )
   {
      if( ! hb_copyfile( hb_parc( 1 ), hb_parc( 2 ), hb_param( 3, HB_IT_BLOCK ) ) )
         hb_retl( HB_FALSE );
   }
   else
      hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );  /* NOTE: Undocumented but existing Clipper Run-time error */
}

Código: Selecionar todos

/*
 * Harbour Project source code:
 * __CopyFile() function
 *
 * Copyright 1999 Andi Jahja <andij@aonlippo.co.id>
 * www - http://harbour-project.org
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this software; see the file COPYING.txt.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307 USA (or visit the web site https://www.gnu.org/).
 *
 * As a special exception, the Harbour Project gives permission for
 * additional uses of the text contained in its release of Harbour.
 *
 * The exception is that, if you link the Harbour libraries with other
 * files to produce an executable, this does not by itself cause the
 * resulting executable to be covered by the GNU General Public License.
 * Your use of that executable is in no way restricted on account of
 * linking the Harbour library code into it.
 *
 * This exception does not however invalidate any other reasons why
 * the executable file might be covered by the GNU General Public License.
 *
 * This exception applies only to the code released by the Harbour
 * Project under the name Harbour.  If you copy code from other
 * Harbour Project or Free Software Foundation releases into a copy of
 * Harbour, as the General Public License permits, the exception does
 * not apply to the code that you add in this way.  To avoid misleading
 * anyone as to the status of such modified files, you must delete
 * this exception notice from them.
 *
 * If you write modifications of your own for Harbour, it is your choice
 * whether to permit this exception to apply to your modifications.
 * If you do not wish that, delete this exception notice.
 *
 */

#include "hbapi.h"
#include "hbapierr.h"
#include "hbapiitm.h"
#include "hbapifs.h"

#if defined( HB_OS_UNIX )
   #include <sys/stat.h>
   #include <unistd.h>
#endif

#ifdef HB_CLP_STRICT
   #define BUFFER_SIZE  8192
#else
   #define BUFFER_SIZE  65536
#endif

static HB_BOOL hb_copyfile( const char * szSource, const char * szDest )
{
   HB_BOOL bRetVal = HB_FALSE;
   HB_FHANDLE fhndSource;
   PHB_ITEM pError = NULL;

   HB_TRACE( HB_TR_DEBUG, ( "hb_copyfile(%s, %s)", szSource, szDest ) );

   do
   {
      fhndSource = hb_fsExtOpen( szSource, NULL,
                                 FO_READ | FXO_DEFAULTS | FXO_SHARELOCK,
                                 NULL, pError );
      if( fhndSource == FS_ERROR )
      {
         pError = hb_errRT_FileError( pError, NULL, EG_OPEN, 2012, szSource );
         if( hb_errLaunch( pError ) != E_RETRY )
            break;
      }
   }
   while( fhndSource == FS_ERROR );

   if( fhndSource != FS_ERROR )
   {
      HB_FHANDLE fhndDest;

      do
      {
         fhndDest = hb_fsExtOpen( szDest, NULL,
                                  FXO_TRUNCATE | FO_READWRITE | FO_EXCLUSIVE |
                                  FXO_DEFAULTS | FXO_SHARELOCK,
                                  NULL, pError );
         if( fhndDest == FS_ERROR )
         {
            pError = hb_errRT_FileError( pError, NULL, EG_CREATE, 2012, szDest );
            if( hb_errLaunch( pError ) != E_RETRY )
               break;
         }
      }
      while( fhndDest == FS_ERROR );

      if( fhndDest != FS_ERROR )
      {
#if defined( HB_OS_UNIX )
         struct stat struFileInfo;
         int iSuccess = fstat( fhndSource, &struFileInfo );
#endif
         void * buffer;
         HB_SIZE nRead;

         buffer = hb_xgrab( BUFFER_SIZE );

         bRetVal = HB_TRUE;

         while( ( nRead = hb_fsReadLarge( fhndSource, buffer, BUFFER_SIZE ) ) != 0 )
         {
            while( hb_fsWriteLarge( fhndDest, buffer, nRead ) != nRead )
            {
               pError = hb_errRT_FileError( pError, NULL, EG_WRITE, 2016, szDest );
               if( hb_errLaunch( pError ) != E_RETRY )
               {
                  bRetVal = HB_FALSE;
                  break;
               }
            }
         }

         hb_xfree( buffer );

#if defined( HB_OS_UNIX )
         if( iSuccess == 0 )
            fchmod( fhndDest, struFileInfo.st_mode );
#endif

         hb_fsClose( fhndDest );
      }

      hb_fsClose( fhndSource );
   }

   if( pError )
      hb_itemRelease( pError );

   return bRetVal;
}

/* Clipper returns .F. on failure and NIL on success */

HB_FUNC( __COPYFILE )
{
   if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) )
   {
      if( ! hb_copyfile( hb_parc( 1 ), hb_parc( 2 ) ) )
         hb_retl( HB_FALSE );
   }
   else
      hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );  /* NOTE: Undocumented but existing Clipper Run-time error */
}
Eu não sei se no xHarbour, o arquivo copyfile.c é incompativel, testem ai p/ verificar.

Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
cjp
Usuário Nível 6
Usuário Nível 6
Mensagens: 1563
Registrado em: 19 Nov 2010 22:29
Localização: paraná
Contato:

Copia com barra de progresso.

Mensagem por cjp »

Não estou conseguindo refazer a lib. Não sei se estou fazendo algo errado.

Peguei o conteúdo do 4. post, alterei de 8192 para 65535 na linha #define BUFFER_SIZE 8192.

Daí salvei o arquivo na pasta \hb32\contrib\xhb com o nome xhbcopyf.c.

Depois digitei HBMK2 ../make.hb clean, conforme orientação do Toledo. Deu programa não reconhecido. Então eu mudei para \hb32\bin\HBMK2 ../make.hb clean. Daí deu: hbshell: não é possível encontrar o script '..\make.hb'.

Não sei como fazer isto. Alguém me ajuda?
Inacio de Carvalho Neto
Avatar do usuário
Itamar M. Lins Jr.
Administrador
Administrador
Mensagens: 7929
Registrado em: 30 Mai 2007 11:31
Localização: Ilheus Bahia
Curtiu: 1 vez

Copia com barra de progresso.

Mensagem por Itamar M. Lins Jr. »

Ola!
Esses dois posts já tem os fonts, modificados pelo Viktor.
Não use o do 4 post.
Ou baixe já pronto(com as correções) git do Viktor.
Harbour unstable sources

Download source archive from any of these links and unpack:

https://github.com/vszakats/harbour-cor ... master.zip
https://github.com/vszakats/harbour-cor ... ter.tar.gz
Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
cjp
Usuário Nível 6
Usuário Nível 6
Mensagens: 1563
Registrado em: 19 Nov 2010 22:29
Localização: paraná
Contato:

Copia com barra de progresso.

Mensagem por cjp »

Baixei do primeiro link, mas, aparentemente, não mudou muita coisa.

Para cópia de um arquivo de 820 Mb, levou 7 minutos e 56 segundos.

Será que eu fiz algo errado?
Inacio de Carvalho Neto
cjp
Usuário Nível 6
Usuário Nível 6
Mensagens: 1563
Registrado em: 19 Nov 2010 22:29
Localização: paraná
Contato:

Copia com barra de progresso.

Mensagem por cjp »

Pessoal, por favor, alguém me ajude a resolver isto. Do contrário, vou ter que abandonar o uso desta função, que tanto me ajuda.

Gostaria de saber como faço para acelerar a cópia de um arquivo grande, pois a diferença de tempo está muito grande.

Agradeceria qualquer ajuda.
Inacio de Carvalho Neto
alxsts
Colaborador
Colaborador
Mensagens: 3092
Registrado em: 12 Ago 2008 15:50
Localização: São Paulo-SP-Brasil

Copia com barra de progresso.

Mensagem por alxsts »

Olá!

Se você não conseguiu recompilar o Harbour com esta função alterada, lembre-se de que ele ( o Harbour ) permite que você junte código C e Harbour em um mesmo arquivo .PRG. Basta colocar o código C entre as diretivas #pragma begindump e #pragma enddump.

Foi o que fiz no exemplo abaixo. Baixe o anexo. Gere o executável com HbMk2 Teste -b

Nos testes que fiz, usei um arquivo .RAR com 5.424.651.238 bytes (5,4 giga bytes). A cópia gastou, em média, três minutos e meio em um computador Core I5, 4 giga de RAM, com Win 7 x64. Aterei os nomes das funções para evitar possíveis conflitos com as do próprio Harbour.

Veja se te ajuda e retorne com possíveis problemas.


Toledo: tentei várias vezes mas, ao postar o código em anexo, dá erro "forbidden..." no fórum. Deve estar interpretando algo errado (parte do código?)...
Anexos
Teste.Prg
Testando a função
(5.72 KiB) Baixado 80 vezes
[]´s
Alexandre Santos (AlxSts)
Avatar do usuário
Toledo
Administrador
Administrador
Mensagens: 3133
Registrado em: 22 Jul 2003 18:39
Localização: Araçatuba - SP
Contato:

Copia com barra de progresso.

Mensagem por Toledo »

alxsts escreveu:Toledo: tentei várias vezes mas, ao postar o código em anexo, dá erro "forbidden..."
Alexandre, este erro é gerado por algum sistema de proteção (segurança) do servidor onde o fórum está hospedado, provavelmente achando que o arquivo tem algum código malicioso.
Faça um teste, no campo de busca aqui do fórum (parte superior da tela) digite F O P E N (sem os espaços) e clique no botão "Busca", o mesmo erro vai ocorrer. Agora se digitar por exemplo FOPENS (colocando um S no final apenas para diferenciar), o erro não ocorre.
Acho que o comando "F O P E N" deve estar numa lista de comandos não permitidos, algo assim... pois este comando é muito utilizado em script ou arquivos maliciosos.

Inclusive agora quando fui enviar esta mensagem, digitando F O P E N sem espaços, ocorreu o erro... vou verificar junto ao suporte do meu servidor o que está ocorrendo.

Abraços,
Toledo - Clipper On Line
toledo@pctoledo.com.br
Harbour 3.2/MiniGui/HwGui
Faça uma doação para o fórum, clique neste link: http://www.pctoledo.com.br/doacao
alxsts
Colaborador
Colaborador
Mensagens: 3092
Registrado em: 12 Ago 2008 15:50
Localização: São Paulo-SP-Brasil

Copia com barra de progresso.

Mensagem por alxsts »

Olá!

Obrigado Toledo.

É o que eu imaginei. Só não sabia que era o F OPEN. O chato é que o usuário perde tudo que havia digitado...
[]´s
Alexandre Santos (AlxSts)
cjp
Usuário Nível 6
Usuário Nível 6
Mensagens: 1563
Registrado em: 19 Nov 2010 22:29
Localização: paraná
Contato:

Copia com barra de progresso.

Mensagem por cjp »

Alexandre, testei o teu exemplo, mas deu algum erro:

Imagem

Também tentei colocar apenas a parte

Código: Selecionar todos

#pragma BEGINDUMP

#include "hbapi.h"
#include "hbapierr.h"
#include "hbapifs.h"
#include "hbapiitm.h"
#include "hbvm.h"

#if defined( HB_OS_UNIX )
   #include <sys/stat.h>
   #include <unistd.h>
#endif

#ifdef HB_CLP_STRICT
   #define BUFFER_SIZE  8192
#else
   #define BUFFER_SIZE  65536   
#endif

static HB_BOOL __hb_copyfile( const char * szSource, const char * szDest, PHB_ITEM pBlock )
{
   HB_BOOL    bRetVal = HB_FALSE;
   HB_FHANDLE fhndSource;
   PHB_ITEM pError = NULL;

   HB_TRACE( HB_TR_DEBUG, ( "__hb_copyfile(%s, %s)", szSource, szDest ) );

   do
   {
      fhndSource = hb_fsExtOpen( szSource, NULL,
                                 FO_READ | FXO_DEFAULTS | FXO_SHARELOCK,
                                 NULL, pError );
      if( fhndSource == FS_ERROR )
      {
         pError = hb_errRT_FileError( pError, NULL, EG_OPEN, 2012, szSource );
         if( hb_errLaunch( pError ) != E_RETRY )
            break;
      }
   }
   while( fhndSource == FS_ERROR );

   if( fhndSource != FS_ERROR )
   {
      HB_FHANDLE fhndDest;

      do
      {
         fhndDest = hb_fsExtOpen( szDest, NULL,
                                  FXO_TRUNCATE | FO_READWRITE | FO_EXCLUSIVE |
                                  FXO_DEFAULTS | FXO_SHARELOCK,
                                  NULL, pError );
         if( fhndDest == FS_ERROR )
         {
            pError = hb_errRT_FileError( pError, NULL, EG_CREATE, 2012, szDest );
            if( hb_errLaunch( pError ) != E_RETRY )
               break;
         }
      }
      while( fhndDest == FS_ERROR );
      
      if( fhndDest != FS_ERROR )
      {
         #if defined( HB_OS_UNIX )
            struct stat struFileInfo;
            int         iSuccess = fstat( fhndSource, &struFileInfo );
         #endif
         
         void * buffer;
         HB_SIZE nRead;

         buffer = hb_xgrab( BUFFER_SIZE );

         bRetVal = HB_TRUE;

         if( hb_itemType( pBlock ) != HB_IT_BLOCK )
            pBlock = NULL;

         while( ( nRead = hb_fsReadLarge( fhndSource, buffer, BUFFER_SIZE ) ) != 0 )
         {
            while( hb_fsWriteLarge( fhndDest, buffer, nRead ) != nRead )
            {
               pError = hb_errRT_FileError( pError, NULL, EG_WRITE, 2016, szDest );
               if( hb_errLaunch( pError ) != E_RETRY )
               {
                  bRetVal = HB_FALSE;
                  break;
               }
            }

            if( pBlock )
            {
               PHB_ITEM pCnt = hb_itemPutNL( NULL, nRead );

               hb_vmEvalBlockV( pBlock, 1, pCnt );

               hb_itemRelease( pCnt );
            }
         }

         hb_xfree( buffer );

         #if defined( HB_OS_UNIX )
            if( iSuccess == 0 )
               fchmod( fhndDest, struFileInfo.st_mode );
         #endif

         hb_fsClose( fhndDest );
      }

      hb_fsClose( fhndSource );
   }

   if( pError )
      hb_itemRelease( pError );
   return bRetVal;
}

/* Clipper returns .F. on failure and NIL on success */

HB_FUNC( __XHB_COPYFILE )
{
   if( HB_ISCHAR( 1 ) && HB_ISCHAR( 2 ) )
   {
      if( ! __hb_copyfile( hb_parc( 1 ), hb_parc( 2 ), hb_param( 3, HB_IT_BLOCK ) ) )
         hb_retl( HB_FALSE );
      else
         hb_retl( HB_TRUE );            
   }
   else
      hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );  
      /* NOTE: Undocumented but existing Clipper Run-time error */
}

#pragma ENDDUMP
//---------------------------------------------------------------------------------------------------------------
no meu programa normal. Mas não mudou nada. Não sei se precisaria mudar mais alguma coisa no programa.
Inacio de Carvalho Neto
alxsts
Colaborador
Colaborador
Mensagens: 3092
Registrado em: 12 Ago 2008 15:50
Localização: São Paulo-SP-Brasil

Copia com barra de progresso.

Mensagem por alxsts »

Olá!

Este programa de teste não trata nomes de arquivos com espaços embutidos. Para efeito de testes, tente com um arquivo que não tenha espaços nos nomes, tanto de origem como de destino.
[]´s
Alexandre Santos (AlxSts)
cjp
Usuário Nível 6
Usuário Nível 6
Mensagens: 1563
Registrado em: 19 Nov 2010 22:29
Localização: paraná
Contato:

Copia com barra de progresso.

Mensagem por cjp »

Testei com o arquivo que normalmente uso. No primeiro teste, deu 3min6seg. No segundo, deu 4min53seg. Sem dúvida, muito menos do que estava dando antes (cerca de 9min).

Minha dúvida agora é: como colocar isto no meu programa? Não basta salvar a parte do teste.prg feita em C++ no meu prg, correto? O que mais eu precisaria fazer?
Inacio de Carvalho Neto
Responder