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-09-30 14:55
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Help: Batch script to create a new folder View 3,334 Replies 18
Floor 16 Posted 2006-11-13 06:27 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
Floor 17 Posted 2009-02-14 12:54 ·  中国 江苏 常州 钟楼区 电信
新手上路
★
Credits 4
Posts 3
Joined 2007-09-08 08:07
19-year member
UID 96838
Gender Male
Status Offline
Although it is an old post. But recently I also encountered the same problem as the original poster. In fact, the original poster's idea still has certain application value. ccwan thinks that putting the shortcut in the system quick launch is the same as right-clicking to create a new one in the resource manager. The problem is that I now need to create new folders (more than dozens) in different directories (more than dozens) every day. In this way, I have to keep copying batch files. Therefore, I have the same idea as the original poster, hoping to have a way to automatically run the batch file to create folders in the newly opened window. I personally think that the batch file may not be able to realize such a function (it can be done at the command line, but I haven't thought of a good way in the Windows window mode).
Floor 18 Posted 2009-02-14 13:14 ·  中国 江苏 常州 钟楼区 电信
新手上路
★
Credits 4
Posts 3
Joined 2007-09-08 08:07
19-year member
UID 96838
Gender Male
Status Offline
Got an idea. Add the function to open the command line in the system right - click pop - up menu, and run the batch processing in the opened window to create folders in batches. New problem: Can the batch processing program be directly added to the right - click menu to run? (This should be able to solve the path problem of creating folders.)
Floor 19 Posted 2009-02-14 13:19 ·  中国 广东 东莞 电信
银牌会员
★★★
批处理编程迷
Credits 1,916
Posts 752
Joined 2008-12-28 04:30
17-year member
UID 135147
Gender Male
From 广西
Status Offline
Drag and drop a folder line, and you can randomly create a sub - directory under its directory

@echo off
if "%1"=="" (md "%cd%\%random%") else (md "%1\%random%")
pause

[ Last edited by netbenton on 2009-2-14 at 11:38 ]
精简
=> 个人网志
Forum Jump: