DOS命令:用For命令遍历文件夹
来源:互联网 发布:网络推广是做什么 编辑:程序博客网 时间:2024/06/01 08:07
- If no directory specification is specified after /R then thecurrent directory is assumed.
- If set is just a single period (.) character then it will justenumerate the directory tree.
- If set is just a single asterisk (*) character then it willjust enumerate the files.
- If set is a single period (.) character followed by a singleasterisk (*) character then it will enumerate the sub-foldersfirstly and then files under the sub-folder recursively.
- If set is a single asterisk (*) character followedby
a single period (.) characterthen it will enumerate the files firstly then the sub-folderrecursively. - Wildcards characters asterisk(*) and
period(.) can be repeated and the loop will also repeatedappropriately. - Question mark(?) is also supported and usually used to filterinterested files or sub-folders under specified folder or thecurrent folder.
REM recursivelyprint
for /R %%s in (list?.xul) do(
)
REM do the same with the above butwithout sleeping
for /R %%s in (list?.xul) do echo%%s
The above examples just perform echo command. However, you cando more complex commands as needed. For example, the followingexample is used to perform the following operations on all *.xulfile under the current folder and sub-folders
- open Firefox with *.xul file
- open *.xul files with notepad
- sleep for 5 seconds
- forcibly kill firefox and notepad
@echo off
set FIREFOX_ROOT="C:\ProgramFiles\Mozilla Firefox\"
set FIREFOX="firefox.exe"
for /R %%s in (*.xul) do (
)
flvtool2.exe给某文件夹中flv文件批量插入关键帧
@echo off
for /R "H:\topntweb\topnt\topnt\" %%s in (*.flv) do (
"H:\topntweb\topnt\topnt\FilesList\Exe\VideoTools\flvtool2.exe" -U %%s
)
pause
- DOS命令:用For命令遍历文件夹
- DOS遍历文件夹命令
- dos命令进入文件夹
- dos命令操作文件夹
- DOS命令创建文件夹
- Dos命令创建文件夹
- 用dos命令动态创建文件夹
- Dos命令 - FOR
- Dos中的 For 命令
- dos for命令详解
- DOS命令参考-FOR
- dos命令for
- dos for 命令
- dos for命令 使用
- DOS命令 For Set
- dos命令之FOR
- dos for 命令详解!
- DOS命令之for
- 对话领度:打造真正提升企业执行力的社交协同软件
- rtmpdump命令
- c++虚继承对象的内存布局
- Leetcode Path Sum II
- 共享内存IPC入门学习
- DOS命令:用For命令遍历文件夹
- linux下FTP服务器配置-VSFTP
- bat的变量与命令set的用法
- 屏蔽F1~F12的快捷键的js函数
- QT Signal/Slot机制介绍
- C#获取相对路径&获取当前路径
- AndroidManifest.xml文件详解(meta-data)
- 16 款最流行的 JavaScript 框架
- Qt中定义可点击标签