Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the IntReturn function

Status
Not open for further replies.

Councilk

MIS
May 14, 2003
72
0
0
US
Hello, I've been able to write a script to move Zip files to a local folder, but I'm trying to use the following which doesn't seem to work

See line of code here

intReturn = WshShell.Run("pkzip25.exe /add=update /move /temp=strDestSvr & strZipFile & " " & strAppFile,4,True)

strDestSvr is a mapped share that show being mapped when I run the Net Use command

Should I just use the hardcoded path?



 
Is there a space in the path?

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Hello no there are no spaces in the path

I can redirect the files to a local folder, and I can map the share in the script, see a portion below

If UCase(strLog) = UCase("Application") Then
strAppFile = "E:\Util\Logs\evntarch\" & strServerName & "-" & GetDateTime() & "-app.log"
intReturn = WshShell.Run("dumpel.exe -f " & strAppFile & " -s " & strServerName & " -l Application -d 500",4,True)
WScript.Sleep 500
strZipFile = "E:\Util\Logs\evntarch\ent\" & strServerName & "-" & GetYearMonth() & ".zip"
intReturn = WshShell.Run("pkzip25.exe /add=update /move /temp=E:\Data\Logs\evntarch " & strZipFile & " " & strAppFile,4,True)
intReturn = WshShell.Run("pkzip25.exe /add=update /move /temp=" & strDestSvr & strZipFile & " " & strAppFile,4,True)
'intReturn = WshShell.Run("pkzip25.exe /add=update /move /temp=\\HSNJFSP01\TNTAPPS\Comp-Ops\NorthEast-eventLog" & strZipFile & " " & strAppFile,4,True)
intReturn = WshShell.Run("pkzip25.exe /add=update /move /temp=E:\\HSNJ-64264\c$\Temp" & strZipFile & " " & strAppFile,4,True)
 
intReturn = WshShell.Run("pkzip25.exe /add=update /move /temp=" & strDestSvr & " " & strZipFile & " " & strAppFile,4,True)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top