Social Icons

miércoles, 18 de julio de 2018

BAT PARA REEMPLAZAR UN ARCHIVO

El siguiente codigo, reemplaza saca un respaldo del arvhivo que se va a reemplazar en varios servidores y copia el archivo nuevo reemplazando el original

echo off

net use \\ECUwctx14\Wallplots /USER:dominio\CuentaServicio "MiPais"

net use \\ECUwctx13\Wallplots /USER:dominio\CuentaServicio "MiPais"

net use \\ECUwctx12\Wallplots /USER:dominio\CuentaServicio "MiPais"

net use \\ECUwctx10\Wallplots /USER:dominio\CuentaServicio "MiPais"

net use \\ECUwctx15\Wallplots /USER:dominio\CuentaServicio "MiPais"



SET Fecha=%Date:~4,2%-%Date:~7,2%-%Date:~10,4%



REM RESPALDO DE ARCHIVO ORIGINAL templates horizontales

copy \\ECUwctx14\Wallplots\PAMCompletionHorizontal.ppc \\ECUwctx14\Wallplots\PamCompletionHorizontal-Backups\PAMCompletionHorizontal%Fecha%.ppc

copy \\ECUwctx13\Wallplots\PAMCompletionHorizontal.ppc \\ECUwctx13\Wallplots\PamCompletionHorizontal-Backups\PAMCompletionHorizontal%Fecha%.ppc

copy \\ECUwctx12\Wallplots\PAMCompletionHorizontal.ppc \\ECUwctx12\Wallplots\PamCompletionHorizontal-Backups\PAMCompletionHorizontal%Fecha%.ppc

copy \\ECUwctx10\Wallplots\PAMCompletionHorizontal.ppc \\ECUwctx10\Wallplots\PamCompletionHorizontal-Backups\PAMCompletionHorizontal%Fecha%.ppc

copy \\ECUwctx15\Wallplots\PAMCompletionHorizontal.ppc \\ECUwctx15\Wallplots\PamCompletionHorizontal-Backups\PAMCompletionHorizontal%Fecha%.ppc



REM COPIAR NUEVO ARCHIVO - CAMBIAR ARCHIVO DE ORIGEN (C:\TemplatesHrz)

copy /Y  C:\TemplatesHrz\PAMCompletionHorizontal.ppc \\ECUwctx14\Wallplots\

copy /Y  C:\TemplatesHrz\PAMCompletionHorizontal.ppc \\ECUwctx13\Wallplots\

copy /Y  C:\TemplatesHrz\PAMCompletionHorizontal.ppc \\ECUwctx12\Wallplots\

copy /Y  C:\TemplatesHrz\PAMCompletionHorizontal.ppc \\ECUwctx10\Wallplots\

copy /Y  C:\TemplatesHrz\PAMCompletionHorizontal.ppc \\ECUwctx15\Wallplots\



REM LOG DE CAMBIO

No hay comentarios.:

Publicar un comentario

Data Analyzer Error Excel

Error en copiar las celdas no se abre el Excel:  Haz clic en YES (Sí) en el mensaje de error y busca manualmente el archivo EXCEL.exe. Depen...

 
 
Blogger Templates