【发布时间】:2018-01-09 21:46:13
【问题描述】:
我确实有带有文件夹的文件夹
my_folders
@folder1
@next_one
some_folder_without_at
@third
some_file.txt
到目前为止,我已经添加了所有文件夹
for /d %%i in ("C:\my\path\to\my_folders\*") do (
call :setfolders %%i
)
目标:我想过滤结果并添加仅以@开头的文件夹
【问题讨论】:
-
标签上写着
bash但脚本看起来像 Windows/DOS 批处理文件? -
你确定你在谈论 bash 吗?在我看来不像。您是否在该模式的末尾尝试过
@*? -
如果
bash使用 glob@* -
在 *nix 下这很容易...
find /path/my_folders -type d -name @\* -print
标签: batch-file for-loop filter pattern-matching directory