Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Output from same script on two different platforms produce different outputs.

$
0
0

I'm running a command prompt script on two different platforms (Windows 7 desktop and a Microsoft Server 2008 R2 Enterprise platform) and the output the script produces is different on each platform. Specifically; the script is

       For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
       For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set mytime=%%a%%b)
       echo %mydate%>> log.txt
       echo %mytime%>> log.txt

and the output from the Windows 7 desktop is:
       2014-07-31
       0249 PM

While the output from the 2008 server is:
       ECHO is on.
       0249 PM


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>