allen2 Posted March 12, 2013 Share Posted March 12, 2013 Never needed to use this means but if you go this way then you could also use something like the method used by Herbert Kleebauer there or like explained there to put any needed executable in the batch as some resource that would be extracted/decoded before being used. Link to comment Share on other sites More sharing options...
jaclaz Posted March 13, 2013 Share Posted March 13, 2013 Never needed to use this means but if you go this way then you could also use something like the method used by Herbert Kleebauer there or like explained there to put any needed executable in the batch as some resource that would be extracted/decoded before being used.Yes, of course , though I personally tend to to use the simpler ECHOO.COM (also by Herbert Kleebauer):for the little uses I need (which are usually connected to "dynamically produce some hex bytes).I am really "old school" but I really see no issues in having an external tool and - whenever possible/advisable - I try not to "embed" anything inside "anything else", in which case the so-called "batch compilers" (which mostly - but not all ) do nothing but package the batch and the needed tools into a SFX archive, seem to me a better choice.jaclaz Link to comment Share on other sites More sharing options...
tomasz86 Posted April 17, 2013 Author Share Posted April 17, 2013 For 2K (but also for XP if one wants to have the date/time format in the "full" UTC format), writing a file and immediately get it's created or last accessed time/date may be a good enough workaround .How about this as a workaround?CD.>tempcabarc n temp._ tempFOR /F "skip=9 tokens=3-8 delims=/: " %%A IN ('cabarc l temp._') DO ECHO %%A%%B%%C.%%D%%E%%FThe result is same as usingdate.exe +%%Y%%m%%d.%%H%%M%%S Link to comment Share on other sites More sharing options...
jaclaz Posted April 17, 2013 Share Posted April 17, 2013 How about this as a workaround?Which advantage has it when compared to the snippet in post #27 (that needs not cabarc or *any* external program)? The issue is that you need to create a file (in your case TWO of them).jaclaz Link to comment Share on other sites More sharing options...
tomasz86 Posted April 17, 2013 Author Share Posted April 17, 2013 The advantage is that you also get seconds and that it's completely locale independent (you get hours in the 24-hour format). Link to comment Share on other sites More sharing options...
jaclaz Posted April 17, 2013 Share Posted April 17, 2013 The advantage is that you also get seconds and that it's completely locale independent (you get hours in the 24-hour format).Ah, well. jaclaz Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now