中国DOS联盟论坛

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-02 06:52
48,037 topics / 350,122 posts / today 2 new / 48,250 members
DOS批处理 & 脚本技术(批处理室) » Usage of the if statement? [Closed]
Printable Version  1,684 / 7
Floor1 chainliq Posted 2006-10-24 23:16
高级用户 Posts 244 Credits 635 From 广西贵港
I want to write a batch script to run a program. The requirement is: If there is a folder named logo in D:\netgame\logo, then run start D:\netgame\logo\logos.js; if not, exit.

[ Last edited by namejm on 2006-10-28 at 12:01 AM ]
Floor2 不得不爱 Posted 2006-10-24 23:33
超级版主 Posts 2,044 Credits 5,310 From 四川南充
如果存在D:\netgame\logo\logos.js,则启动D:\netgame\logo\logos.js

Translated:
If EXIST D:\netgame\logo\logos.js start D:\netgame\logo\logos.js
Floor3 chainliq Posted 2006-10-24 23:41
高级用户 Posts 244 Credits 635 From 广西贵港
Oh, looking at the LZ's writing is so simple. I've been trying for a long time without success. It seems I need to often come here to recharge!
Floor4 不得不爱 Posted 2006-10-24 23:44
超级版主 Posts 2,044 Credits 5,310 From 四川南充
Is it the person upstairs? Isn't the original poster yourself?
Floor5 chainliq Posted 2006-10-25 00:11
高级用户 Posts 244 Credits 635 From 广西贵港
Just ask casually.
If there is a .logo1_vir file under drive D, then execute this line: del D:\**.logo1_vir /f/s/q/a.
If not, exit.
How to do it!
Thanks!
Floor6 lxmxn Posted 2006-10-25 00:15
版主 Posts 4,938 Credits 11,386

  Oh, the moderator has already demonstrated it to you once. Why still don't you get it?
Floor7 不得不爱 Posted 2006-10-25 01:48
超级版主 Posts 2,044 Credits 5,310 From 四川南充
如果存在D:\*.logo1_vir,则删除D:\**\logo1_vir,使用/f/s/q/a参数
Floor8 chainliq Posted 2006-10-27 15:46
高级用户 Posts 244 Credits 635 From 广西贵港
Well, finally finished the task, thank you very much for qwe1234567's help!
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023