Re: How Can Execute this with WSH?



Thanks Richard, works perfectly !!!!.
Thanks Ekkehard too.

Nelson

"Nelson Rodriguez" <neroig@xxxxxxxxxxxxx> escribió en el mensaje de noticias news:46BA9565-D9A0-419F-B0B4-B7620830F0A7@xxxxxxxxxxxxxxxx
I have problemas with the blank between words RESPALDOS and NELSON.

Can someone help me please?
Thanks.


Set fso = CreateObject("Scripting.FileSystemObject")
set shell=createobject("Wscript.Shell")
cdirbkp="D:\CTM\*.*"

mes=month(date)
if month(date)<10 then
mes="0"&month(date)
end if
dia=day(date)
if day(date)<10 then
dia="0"&day(date)
end if

ctarget2="\\sg05\DSATA\Respaldos Nelson\CTM_"&year(date)&mes&dia & ".ZIP"

if fso.FileExists(ctarget) then
fso.DeleteFile(ctarget)
end if

xcmd_zip="C:\Archivos de Programa\winzip\winzip32.exe -min -a -r -p -ex " & ctarget2 & " " & cdirbkp

Set oShell=shell.exec(xcmd_zip)
Do While oShell.Status = 0
WScript.Sleep 500
Loop



.


Loading