Jump to content
Sign in to follow this  
gcue

quotes n variables for filename

Recommended Posts

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 by gcue

Share this post


Link to post
Share on other sites

$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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...