gcue Posted April 25, 2008 Posted April 25, 2008 (edited) trying to use variablename for filename. i tried running it through scite and didnt find any syntax errors. output i get is just ".zip" $filename = twelvehour(@HOUR) & "." & @MIN & "." & @SEC & "_" & @MON & "-" & @MDAY & "-" & @YEAR Func twelvehour($hour) If $hour > 12 Then $hour -= 12 Return StringFormat("%02i", $hour) EndFunc MsgBox(0, "filename", "c:\" & $filename & ".zip") RunWait("wzzip " & $toolsdir & '"\Log Grabber\" & $filename & ".zip" "\\d0056849\c$\program files\etp\rolling.log"') Edited April 25, 2008 by gcue
weaponx Posted April 25, 2008 Posted April 25, 2008 $filename = StringFormat("%s.%s.%s_%s-%s-%s.zip", twelvehour(@HOUR), @MIN, @SEC, @MON, @MDAY, @YEAR) MsgBox(0, "filename", "c:\" & $filename) $runString = StringFormat('wzzip "%s\Log Grabber\%s" "\\d0056849\c$\program files\etp\rolling.log"', $toolsdir, $filename) Func twelvehour($hour) If $hour > 12 Then $hour -= 12 Return StringFormat("%02i", $hour) EndFunc
gcue Posted April 25, 2008 Author Posted April 25, 2008 hmm that didnt work wzzip is winzip's commandline utility. dont think its running the wzzip prog at all....cause i dont see the dos window popup
zorphnog Posted April 25, 2008 Posted April 25, 2008 Did you add a RunWait command? Should be: $filename = StringFormat("%s.%s.%s_%s-%s-%s.zip", twelvehour(@HOUR), @MIN, @SEC, @MON, @MDAY, @YEAR) MsgBox(0, "filename", "c:\" & $filename) $runString = StringFormat('wzzip "%s\Log Grabber\%s" "\\d0056849\c$\program files\etp\rolling.log"', $toolsdir, $filename) RunWait($runString) Func twelvehour($hour) If $hour > 12 Then $hour -= 12 Return StringFormat("%02i", $hour) EndFunc
gcue Posted April 25, 2008 Author Posted April 25, 2008 yes i have that line there. still not working. any other ideas?
zorphnog Posted April 25, 2008 Posted April 25, 2008 Have you specified the working directory where wzzip is located? RunWait($runString, <path to wzzip>)
weaponx Posted April 25, 2008 Posted April 25, 2008 This worked for me: $wzzipDir = @ProgramFilesDir & "\WinZip" $source = @WindowsDir & "\Notepad.exe" $destination = @DesktopCommonDir & "\test.zip" $RunString = StringFormat('wzzip.exe "%s" "%s"', $destination, $source) RunWait($wzzipDir & "\" & $RunString, $wzzipDir, @SW_SHOW)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now