开发者

How to concatenate variables in cmd shell

I am writing a cmd script. Part of what I have to do requires me to concatenate the values of two variables. I've created开发者_高级运维 a variable called %mydate%, and I would like to concatenate that with a space and the value of the system variable %time%.

I've tried set mydate2 = %mydate% %time%, but it is null.

Any ideas?

TIA!


This works for me:

set mydate2=%date% %time%

Note: %date% and %time% are just examples - they are created by the interpreter and thus always exist.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜