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-09 09:10
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help]How to create a new file with batch processing, not a folder oh View 4,150 Replies 12
Original Poster Posted 2008-06-26 10:56 ·  中国 福建 漳州 电信
新手上路
Credits 19
Posts 9
Joined 2007-01-05 12:52
19-year member
UID 75533
Gender Male
Status Offline
How to create a new file with batch processing, not a folder. For example, create a file named 123.dll under the D drive. Can this be done through batch processing? Please help, experts.
Floor 2 Posted 2008-06-26 11:08 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
```
type nul>"D:\123.dll"
```
Floor 3 Posted 2008-06-26 11:14 ·  中国 福建 漳州 电信
新手上路
Credits 19
Posts 9
Joined 2007-01-05 12:52
19-year member
UID 75533
Gender Male
Status Offline
Originally posted by HAT at 2008-6-26 11:08 AM:
type nul>"D:\123.dll"

Thanks. Solved
Floor 4 Posted 2008-06-26 16:06 ·  中国 河南 郑州 联通
新手上路
Credits 16
Posts 9
Joined 2008-06-25 00:48
18-year member
UID 120775
Gender Male
Status Offline
Floor 5 Posted 2008-06-26 16:18 ·  中国 山东 潍坊 联通
初级用户
★★
Credits 73
Posts 51
Joined 2007-08-31 10:04
18-year member
UID 96241
Gender Male
Status Offline
echo.>123.dll

or type null>123.dll
Floor 6 Posted 2008-06-26 18:37 ·  中国 北京 联通
银牌会员
★★★
Credits 1,287
Posts 634
Joined 2007-05-02 15:06
19-year member
UID 87277
Gender Male
From cmd.exe
Status Offline
It seems there is a typo in the original text. It should be "fsutil file createnew". The translation of "fsutil file createnew" in English is "fsutil file createnew" (since it's a specific command and remains as is in terms of the command itself when translated, but noting the typo correction).
Floor 7 Posted 2008-06-27 22:09 ·  中国 重庆 大足区 联通
初级用户
Credits 44
Posts 25
Joined 2007-03-25 00:24
19-year member
UID 82812
Gender Male
Status Offline
Got it, I'm going to prepare to study batch processing carefully.
Floor 8 Posted 2008-06-28 12:29 ·  中国 湖南 株洲 电信
金牌会员
★★★★
永远的学习者
Credits 3,105
Posts 1,276
Joined 2008-03-08 13:00
18-year member
UID 112398
Gender Male
Status Offline
A brief summary:

echo:
echo.>123.dll
echo/>123.dll
echo\>123.dll
echo 0>123.dll
echo 2>123.dll
...
echo 9>123.dll
cd:
cd.>123.dll
cd/>123.dll
type:
type nul>123.dll
Note: copy con is not practical.
批处理之家新域名:www.bathome.net
Floor 9 Posted 2008-07-28 12:02 ·  中国 黑龙江 哈尔滨 联通
新手上路
Credits 6
Posts 3
Joined 2008-07-28 10:45
18-year member
UID 122238
Gender Male
Status Offline
By no means an advertisement, I personally think this should be a relatively satisfactory answer to the age-old and evergreen topic of creating new files under DOS. Unless you are a seasoned veteran, you will definitely gain something from it! Hehe, also add a little popularity to this small site! Mutual benefit and reciprocity!

http://hjp.jimdo.com/dosizuuuyuuooaiyuei.php

[ Last edited by shhx2005 on 2008-7-28 at 12:08 PM ]
Floor 10 Posted 2008-07-28 14:20 ·  中国 广东 广州 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
rem.>123.dll

[ Last edited by 523066680 on 2008-7-28 at 03:47 PM ]
Floor 11 Posted 2008-07-28 23:38 ·  中国 黑龙江 哈尔滨 延寿县 联通
新手上路
Credits 6
Posts 3
Joined 2008-07-28 10:45
18-year member
UID 122238
Gender Male
Status Offline
Originally posted by 523066680 at 2008-7-28 02:20 PM:
rem.>123.dll

[ Last edited by 523066680 on 2008-7-28 at 03:47 PM ]


Tested and works well, amazing! Now, the assertion that no empty files can be created under DOS is completely overturned in this thread!

Good post!

Looking at the tone of the LZ's request, he also regarded it as a very difficult thing, but no one expected there are so many perfect solutions!
Floor 12 Posted 2008-07-29 07:42 ·  中国 广东 广州 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
Hey... This makes me even more speechless. Do you know why I came to this forum? Because I read the essence posts of batch processing, and read through the batch processing textbooks sorted by cn-dos one by one (many of which I still don't understand at that time). After that, I started to come to the forum. For creating empty files under DOS, you should search more posts. There are many methods.

I've been a bit overconfident recently, but I guess the seniors in the forum should also be quite depressed. When you first come to cn-dos, you should read more of the pinned content! What do you take the textbooks sorted by seniors as?

Come to the forum and post questions when you have problems. Especially this kind of post, I really want to deduct points for you. I could deduct you 8 points, but I didn't! People, who can be without faults. Moreover, ignorance is no crime. (Saying this makes me want to vomit... depressed)

Read more of the essence posts of batch processing in the future! Read more of the pinned textbooks!

Like this post, both the person upstairs and the poster should read it carefully!
Newcomer's arrangement:
http://www.cn-dos.net/forum/viewthread.php?tid=34049&fpage=1
In the arrangement, you can find the following post:

Batch processing to generate empty files:
http://www.cn-dos.net/forum/viewthread.php?tid=22336

The following content for generating files is excerpted from 100 DOS skills:
http://www.cn-dos.net/forum/viewthread.php?tid=23999&fpage=0&highlight=&page=1

15. Directly edit and generate files under DOS
In the case of no any editing software (such as EDLIN, EDIT, etc.), you can temporarily use the following six methods to edit and generate files from the keyboard. When the file content is input完毕, press the F6 key or press Ctrl+Z key to save and exit:
Method 1: COPY CON filename
Method 2: TYPE CON>filename
Method 3: MORE>filename
Method 4: SORT>filename
Method 5: FIND "XXX" /V/N>filename
Method 6: SORT|FIND "XXX" /V/N>filename
Methods 4, 5, and 6 all have special uses. Readers might as well have a try.
16. Generation of zero-byte files
Method: TYPE NUL>filename
The above method is often used to handle disk files that need to be kept secret, playing the role of deleting the file content. After the content is deleted, it is generally not recoverable.





I have collected some relatively good tutorials in my network disk here. Please enter
http://523066680.ys168.com
Enter the tutorial area

[ Last edited by 523066680 on 2008-7-29 at 09:55 AM ]
Floor 13 Posted 2008-08-07 13:13 ·  中国 黑龙江 哈尔滨 联通
新手上路
Credits 6
Posts 3
Joined 2008-07-28 10:45
18-year member
UID 122238
Gender Male
Status Offline
The person upstairs is really a great expert!
Forum Jump: