![]() |
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-15 14:57 |
47,813 topics / 349,903 posts / today 1 new / 48,257 members |
| DOS疑难解答 & 问题讨论 (解答室) » Does "if (not) exist" not be able to be used with *.*? |
| Printable Version 1,887 / 2 |
| Floor1 crist | Posted 2010-12-04 15:10 |
| 新手上路 Posts 11 Credits 18 | |
|
Running `if exist a\*.* echo right` result:
Echoes "right" regardless of whether a is an empty directory Running `if not exist a\*.* echo wrong` result: If a is an empty directory, there is no echo; if a is a non-empty directory, it echoes "error" It seems that `if (not) exist` cannot be used with `*.*`. What is the reason for this? [ Last edited by crist on 2010-12-4 at 15:16 ] |
|
| Floor2 netwinxp | Posted 2010-12-30 17:17 |
| 高级用户 Posts 366 Credits 741 | |
|
if not exist a\*.*
This is a sentence that doesn't make logical sense by itself... |
|
| Floor3 sfcctv | Posted 2011-01-01 22:35 |
| 中级用户 Posts 135 Credits 208 From 离恨天 | |
|
Make a mark to prevent similar mistakes.
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |