China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 16:52
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How can I execute a bat file without popping up the command line window? View 2,014 Replies 6
Original Poster Posted 2006-06-01 13:59 ·  中国 江西 吉安 遂川县 电信
中级用户
★★
Credits 253
Posts 112
Joined 2006-05-31 11:12
20-year member
UID 56308
Gender Male
Status Offline
I'm a newbie, just learning DOS.
I'm very interested in batch processing~~
I tried to save
@echo off
copy G:\01.mp3 G:\mp3
copy G:\02.mp3 G:\mp3
copy G:\03.mp3 G:\mp3
copy G:\04.mp3 G:\mp3
as copy.bat
After execution, I still found that the command line window popped up, and it prompted

1 file(s) copied.
1 file(s) copied.
1 file(s) copied.
1 file(s) copied.

Is there a way to not pop up the command line window when executing the bat?
Confused`~~
Floor 2 Posted 2006-06-02 18:19 ·  IANA 局域网IP(Private-Use)
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
There is no solution now. If using VBS, you can use wscript.run, vbhide to achieve it! (In fact, VBS copying is basically not displayed at all~)

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 3 Posted 2006-06-03 13:22 ·  中国 江西 吉安 遂川县 电信
中级用户
★★
Credits 253
Posts 112
Joined 2006-05-31 11:12
20-year member
UID 56308
Gender Male
Status Offline
Oh, I'm dizzy~~ I don't know VBS..
I've posted for a few days and only you replied. I thought the problem was too simple and the experts disdained to answer~~
......
May I ask where there are introductory tutorials on VB???
Floor 4 Posted 2006-06-03 14:02 ·  中国 广东 广州 电信
中级用户
★★
Credits 466
Posts 237
Joined 2005-10-12 20:53
20-year member
UID 43413
Status Offline
There are many posts about hidden batch processing in the forum.
Floor 5 Posted 2006-06-03 17:26 ·  中国 上海 华为云
中级用户
★★
Credits 256
Posts 93
Joined 2006-03-26 22:12
20-year member
UID 52853
Gender Male
From 广东
Status Offline
```
You can write it like this in VBS. Modify it according to your requirements.
dim fso
set fso=createobject("scripting.filesystemobject")
fso.copyfile "g:\*.mp3","g:\mp3"
```
Floor 6 Posted 2006-06-04 12:09 ·  中国 江西 吉安 遂川县 电信
中级用户
★★
Credits 253
Posts 112
Joined 2006-05-31 11:12
20-year member
UID 56308
Gender Male
Status Offline
Okay, I'll give it a try. I know nothing about VB at all...
What I mentioned earlier about COPY *.* is just an example... What I want to know is if there's a way for batch processing not to pop up the command line.
Floor 7 Posted 2006-06-04 14:44 ·  中国 山西 临汾 中移铁通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
23-year member
UID 19
Gender Male
Status Offline
Re junyee:

Closed: How to make a batch file not display when executed
http://www.cn-dos.net/forum/viewthread.php?tid=18039

How to hide the window that executes batch commands? Urgent, urgent......
http://www.cn-dos.net/forum/viewthread.php?tid=15507


───────────────── Moderator's Note ─────────────────
To save both yours and our time and forum space, please make good use of the forum's "Search" function and web search engines.
Link to the forum's search function: http://www.cn-dos.net/forum/search.php
Recommended domestic information resource search engine: http://www.baidu.com/
Recommended international information resource search engine: http://www.google.com/
───────────────── Moderator's Note ─────────────────
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Forum Jump: