elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Entrar al Canal Oficial Telegram de elhacker.net


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  Error robocopy
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Error robocopy  (Leído 8,012 veces)
otrebo

Desconectado Desconectado

Mensajes: 7


Ver Perfil
Error robocopy
« en: 19 Marzo 2012, 05:50 am »

Hola amigos, encontré estos comandos y lo que busco es hacer una copia de seguridad

@echo off

set tiempo=%time:~0,5%
set tiempo=%tiempo::=-%
set fecha=%date:~0%
set fecha=%fecha:/=-%
set file=%fecha% %tiempo%
echo %file%

set ruta="C:\COPIA\%file%"
mkdir %ruta%

robocopy  %1 %ruta%  /E
PAUSE

Trabajo con Win XP y el error que me arroja es:

"robococy" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
presione una tecla para continuar ...

Que puedo harcer para utilizar este programa que me permitiria enviar todo a mi carpeta C:\COPIA\

El xcopy me puede ser util, de ser así, cual sería la forma de utilizarlo aquí. O como, donde conseguir el robocopy.

Un saludo


« Última modificación: 19 Marzo 2012, 05:56 am por otrebo » En línea

HdM


Desconectado Desconectado

Mensajes: 1.674



Ver Perfil
Re: Error robocopy
« Respuesta #1 en: 19 Marzo 2012, 11:37 am »

Buenas.

Robocopy viene en windows posteriores a vista. No obstante te la puedes descargar aquí:

http://www.mediafire.com/?d0ukkqo316ogd24

Descomprimes y copias en "C:\windows\system32\"

Saludos.


En línea

- Nice to see you again -
edgartt

Desconectado Desconectado

Mensajes: 1


Ver Perfil
Re: Error robocopy
« Respuesta #2 en: 20 Marzo 2012, 03:57 am »

prueba robocopy segun lo siguiente
Usage : ROBOCOPY source destination [file [file]...] [options]

             source : Source Directory (drive:\path or \\server\share\path).
        destination : Destination Dir  (drive:\path or \\server\share\path).
               file : File(s) to copy  (names/wildcards: default is "*.*").

Copy options:    /S : copy Subdirectories, but not empty ones.
                 /E : copy subdirectories, including Empty ones.
             /LEV:n : only copy the top n LEVels of the source directory tree.

                 /Z : copy files in restartable mode.

               /SEC : copy SECurity info (both source and dest must be NTFS).
            /SECFIX : FIX SECurity info on existing files and dirs.
            /TIMFIX : FIX TIMestamps on existing destination files.

               /MOV : MOVe files (delete from source after copying).
              /MOVE : MOVE files AND dirs (delete from source after copying).

             /PURGE : delete dest files/dirs that no longer exist in source.
               /MIR : MIRror a directory tree (equivalent to /E plus /PURGE).

   /A+:[R][A][H] : add the given Attributes to copied files.
   /A-:[R][A][H] : remove the given Attributes from copied files.

            /CREATE : CREATE directory tree structure + zero-length files only.
               /FAT : create destination files using 8.3 FAT file names only.

File Selection:  /A : copy only files with the Archive attribute set
                 /M : like /A, but remove Archive attribute from source files.
   /IA:[R][A][H] : Include only files with some of the given Attributes set.
   /XA:[R][A][H] : eXclude files with any of the given Attributes set.

 /XF file [file]... : eXclude Files matching given names/paths/wildcards.
 /XD dirs [dirs]... : eXclude Directories matching given names/paths.

    /XC | /XN | /XO : eXclude Changed | Newer | Older files.
          /XX | /XL : eXclude eXtra | Lonely files and dirs.
                /IS : Include Same files.

             /MAX:n : MAXimum file size - exclude files bigger than n bytes.
             /MIN:n : MINimum file size - exclude files smaller than n bytes.

          /MAXAGE:n : MAXimum file AGE - exclude files older than n days/date.
          /MINAGE:n : MINimum file AGE - exclude files newer than n days/date.
                      (If n < 1900 then n = n days, else n = YYYYMMDD date).

Retry Options: /R:n : number of Retries on failed copies: default is 1 million.
               /W:n : Wait time between retries: default is 30 seconds.

               /REG : Save /R:n and /W:n in the Registry as default settings.

               /TBD : wait for sharenames To Be Defined (retry error 67).

Logging Options: /L : List only - don't copy, timestamp or delete any files.
                 /X : report all eXtra files, not just those selected.
                 /V : produce Verbose output, showing skipped files.
En línea

Eleкtro
Ex-Staff
*
Desconectado Desconectado

Mensajes: 9.817



Ver Perfil
Re: Error robocopy
« Respuesta #3 en: 20 Marzo 2012, 04:18 am »

Como dices que no tienes necesidad de usar robocopy no te compliques, Te modifico el code para usar el XCopy.

Código
  1. @Echo OFF
  2. set tiempo=%time:~0,5%
  3. set tiempo=%tiempo::=-%
  4. set fecha=%date:~0%
  5. set fecha=%fecha:/=-%
  6. set file=%fecha% %tiempo%
  7. echo %file%
  8.  
  9. set "ruta=C:\COPIA\%file%\"
  10. mkdir "%ruta%"
  11.  
  12. XCopy /E /Y %1 "%ruta%"

PD: Recuerda que "XCopy" solo sirve para copiar carpetas (Y su contenido). Si lo que quieres es copiar un archivo usa el comando "Copy".
Código
  1. Copy /Y %1 "%ruta%"

Saludosss
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Robocopy
Software
zuluwolf 4 4,609 Último mensaje 19 Julio 2011, 10:39 am
por WaAYa HaCK
[MOD] Mensaje de error: Dma controller error - fatal error system halted « 1 2 »
Hardware
evgeni1970 14 21,201 Último mensaje 6 Noviembre 2011, 22:27 pm
por evgeni1970
Help! Script robocopy en Batch
Scripting
sora_ori 0 2,357 Último mensaje 29 Enero 2013, 21:19 pm
por sora_ori
uso de robocopy
Scripting
Jorgegs 2 2,404 Último mensaje 9 Enero 2017, 18:21 pm
por Jorgegs
Robocopy ¿Se pueden copiar archivos en la misma carpeta con robocopy?
Windows
luismanriquec 2 2,405 Último mensaje 1 Noviembre 2017, 18:44 pm
por luismanriquec
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines