![](/img/trans.png)
[英]How can I use CMD to create a subfolder in a folder and move every 10 files created there?
[英]CMD Dir : i can use * instead subfolder
这是我的树:
f:\mega\user1\rubbish\ f:\mega\user2\rubbish\ f:\mega\user3\rubbish\..... f:\mega\usern\rubbish\
我想(仅)列出各种“垃圾”文件夹中的所有文件。
我尝试了这个命令但没有成功:
DIR F:\mega\*\rubbish\
有什么建议么?
从 cmd.exe 提示符尝试此操作。
powershell -NoLogo -NoProfile -Command ^
"Get-ChildItem -Directory -Path 'F:\mega\*\rubbish'"
当然,在 PowerShell 控制台或 .ps1 文件脚本中更容易。
Get-ChildItem -Directory -Path 'F:\mega\*\rubbish'
或者,可能这会将名称限制为“用户*”子目录。
Get-ChildItem -Directory -Path 'F:\mega\user*\rubbish'
要仅获取文件的完全限定路径...
(Get-ChildItem -Directory -Path 'F:\mega\user*\rubbish').FullName
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.