- wscript.echo "Testoutput"
- wscript.echo "This is a test"
- @echo off
- FOR /F "usebackq delims=" %%i IN (`cscript test.vbs`) DO Set myvar=%%i
- echo Srcipt result = "%myvar%"
Apparently it depends on the Windows installation language, how the date function or %DATE% environment variable is formatted. So here is a very ugly hack to get a julian date (YYYYMMDDHHiiss) in a Windows batch script, independent off system locale settings:
Notice that this requires MySQL. If you do not like to use your MySQL root code, you can create a new user with absolutely no rights granted.
But again, this solution is stupid, I hope you will never need it or use it. I just thought I would share, since it was driving my co-worker crazy, and we ended up using it to name a MySQL dump.