![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-19 09:16 |
47,814 topics / 349,908 posts / today 0 new / 48,259 members |
| DOS疑难解答 & 问题讨论 (解答室) » Question about variable assignment |
| Printable Version 890 / 3 |
| Floor1 pncgj | Posted 2007-10-09 10:15 |
| 新手上路 Posts 5 Credits 16 | |
|
How can I do this in a batch process: assign the value returned by a function to a variable, and then create a directory based on that variable?
if exist c:\test.bat ( echo c:\test.bat exists ) else ( echo c:\test.bat does not exist --I want to get a string from the function below, and assign that string to a variable x, but I don't know how to do this step d:\dostools\datex -f yyyymmdd -o -1 --create a directory based on variable x md x) ) |
|
| Floor2 Climbing | Posted 2007-10-09 11:05 |
| 铂金会员 Posts 2,753 Credits 6,962 From 河北保定 | |
| Floor3 pncgj | Posted 2007-10-09 11:25 |
| 新手上路 Posts 5 Credits 16 | |
|
Thanks to the poster above, the problem has already been solved!
|
|
| Floor4 sherman3 | Posted 2008-06-03 14:42 |
| 新手上路 Posts 2 Credits 4 | |
|
The datex command can't be used in windows2003, right?
[ Last edited by sherman3 on 2008-6-3 at 03:05 PM ] |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |