|
yyqfeng
初级用户
 
积分 22
发帖 19
注册 2009-7-12
状态 离线
|
『楼 主』:
DOS命令复制当前目录下指定的文件夹
使用 LLM 解释/回答一下
DOS命令复制当前目录下指定的文件夹下的内容复制到磁盘里怎样写代码?(复制包括空文件,不复制本身)
How to write code to copy the contents of a specified folder under the current directory to a disk? (Include empty files, do not copy the folder itself)
|
|
2010-6-8 09:10 |
|
|
Hanyeguxing
银牌会员
     正在学习中的菜鸟...
积分 1039
发帖 897
注册 2009-3-1 来自 在地狱中仰望天堂
状态 离线
|
|
2010-6-8 10:20 |
|
|
yyqfeng
初级用户
 
积分 22
发帖 19
注册 2009-7-12
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
@echo off
for /f "delims=ABC " %%i in ('find "ABC"') do xcopy /e %%i d:\
pause>nul
我的文件夹是ABC 这样写运行不了的呀
@echo off
for /f "delims=ABC " %%i in ('find "ABC"') do xcopy /e %%i d:\
pause>nul
The folder I have is "ABC", and this doesn't work when written like this.
|
|
2010-6-8 11:04 |
|
|
Hanyeguxing
银牌会员
     正在学习中的菜鸟...
积分 1039
发帖 897
注册 2009-3-1 来自 在地狱中仰望天堂
状态 离线
|
|
2010-6-8 16:38 |
|
|
yyqfeng
初级用户
 
积分 22
发帖 19
注册 2009-7-12
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
是将批处理所在的文件夹里指定的“ABC"文件夹复制到F:磁盘里的呀?
Is it to copy the specified "ABC" folder in the folder where the batch file is located to the F: disk?
|
|
2010-6-9 13:58 |
|
|
yyqfeng
初级用户
 
积分 22
发帖 19
注册 2009-7-12
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
寒夜兄帮忙一下的呀
Brother Hanye, please give me a hand.
|
|
2010-6-9 18:26 |
|
|
Hanyeguxing
银牌会员
     正在学习中的菜鸟...
积分 1039
发帖 897
注册 2009-3-1 来自 在地狱中仰望天堂
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
复制当前目录中的abc目录中的所有文本文件(允许文件大小为0)到f盘
xcopy abc\*.txt f:\
同时要求包括隐藏、系统、只读属性的
xcopy /rh abc\*.txt f:\
Copy all text files (allowing files of size 0) in the abc directory in the current directory to the F drive
xcopy abc\*.txt f:\
And it is required to include files with hidden, system, and read-only attributes
xcopy /rh abc\*.txt f:\
|

批处理之家 http://bbs.bathome.net/forum-5-1.html |
|
2010-6-10 01:11 |
|
|
yyqfeng
初级用户
 
积分 22
发帖 19
注册 2009-7-12
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
ABC文件夹里再有文件夹怎么复制不进去的呀?
Why can't I copy files into the subfolder in the ABC folder?
|
|
2010-6-10 21:30 |
|
|
yyqfeng
初级用户
 
积分 22
发帖 19
注册 2009-7-12
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
xcopy /e ABC I:\
pause这样搞定了
RH是什么意思?
xcopy /e ABC I:\
pause Done
What does RH mean?
|
|
2010-6-10 21:42 |
|
|
Hanyeguxing
银牌会员
     正在学习中的菜鸟...
积分 1039
发帖 897
注册 2009-3-1 来自 在地狱中仰望天堂
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
楼主可以多看看xcopy的参数xcopy/?
1,如果要包括子目录,则使用/s参数
2,要只复制文件夹而不复制文件,则使用/t参数
3,要包含空目录,使用/e参数
The poster can take a look at the parameters of xcopy, xcopy /?
1. If you want to include subdirectories, use the /s parameter
2. To copy only folders but not files, use the /t parameter
3. To include empty directories, use the /e parameter
|

批处理之家 http://bbs.bathome.net/forum-5-1.html |
|
2010-6-10 23:06 |
|
|
yyqfeng
初级用户
 
积分 22
发帖 19
注册 2009-7-12
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
寒夜兄批处理可以实现按键点击连接另一个BAT文件的吗?
如果可以写个例子出来让我学学。
Can Brother Han Ye use batch processing to achieve key clicks to connect to another BAT file? If possible, write an example for me to learn.
|
|
2010-6-11 14:51 |
|
|
Hanyeguxing
银牌会员
     正在学习中的菜鸟...
积分 1039
发帖 897
注册 2009-3-1 来自 在地狱中仰望天堂
状态 离线
|
|
2010-6-11 15:33 |
|
|
yyqfeng
初级用户
 
积分 22
发帖 19
注册 2009-7-12
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
就是像软件一样上面有个按键。比如“确定” 你点击‘确定“就可以打开另一个BAT文件。这个功能可以实现的吧?
It's like there's a button on a software. For example, "OK", you click "OK" and you can open another BAT file. Can this function be realized?
|
|
2010-6-11 17:28 |
|
|
yyqfeng
初级用户
 
积分 22
发帖 19
注册 2009-7-12
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
echo off
color 0a
cls
set a=12
set b=4
:reb
set /a a+=25
set /a b+=3
mode con: cols=%a% lines=%b%
echo ╭───╮ ╭───╮
echo │格式化│ │ 复制 │
echo ╰───╯ ╰───╯
pause
比如我可以用鼠标点击“格式化”就可以打开格式化的BAT文件
点击复制就打开复制BAT的文件
echo off
color 0a
cls
set a=12
set b=4
:reb
set /a a+=25
set /a b+=3
mode con: cols=%a% lines=%b%
echo ╭───╮ ╭───╮
echo │Format│ │Copy │
echo ╰───╯ ╰───╯
pause
For example, I can use the mouse to click "Format" to open the BAT file for formatting, and click "Copy" to open the BAT file for copying.
|
|
2010-6-11 21:04 |
|
|
yyqfeng
初级用户
 
积分 22
发帖 19
注册 2009-7-12
状态 离线
|
|
2010-6-12 11:17 |
|