Windows batch file timing bug

Posted by elbillaf on Stack Overflow See other posts from Stack Overflow or by elbillaf
Published on 2012-12-09T18:34:29Z Indexed on 2012/12/09 23:04 UTC
Read the original article Hit count: 244

Filed under:
|
|

I've used %time% for timing previously - at least I think I have. I have this weird

IF NOT "%1" == "" (
    echo Testing: %1
    echo Start: %time%
    sqlcmd -S MYSERVER  -i test_import_%1.sql -o "test_%1%.log"
    sleep 3
    echo End:   %time%
)

I run this, and it prints:

Testing: pm
Start: 13:29:45.30
End:   13:29:45.30

In this case, my sql code is failing (different reason), but I figure the sleep 3 should make the time increment by 3 at least. Any ideas? tx, tff

© Stack Overflow or respective owner

Related posts about Windows

Related posts about batch-file