This is supposed to be a simple status report of some file copying that is called in a subroutine. I suspect my use of testing a variable for a "true" result may not be the proper method, or perhaps my syntax is simply wrong... %-)
Here's the code snippit:
So, is it wrong to use the MoveOK variable to store a true/false result and test for it? or have I done a stupid typo? The error is "Expected end of statement", but I can't see what punctuation I may have wrong in my script (or do I need to "call" the sub, complete with parentheses?)
Here's the code snippit:
Code:
if FileSize > 1024 then
WshShell.LogEvent 4, "IMSS Archive folder greater than 1GB"
MoveOK = MoveFiles IMSSFolder
if MoveOK then
WshShell.LogEvent 0, "IMSS files moved to archive location"
else
WshShell.LogEvent 1, "IMSS file move failed"
end if
end if
sub MoveFiles(IMSSFolder)
[moving folders stuff, works perfectly]
end sub
So, is it wrong to use the MoveOK variable to store a true/false result and test for it? or have I done a stupid typo? The error is "Expected end of statement", but I can't see what punctuation I may have wrong in my script (or do I need to "call" the sub, complete with parentheses?)