[英]Powershell - Search for all IP addresses except 127.0.0.1 in all files and subdirectories
[英]Can I run a Windows Powershell command matching all files in the current directory and all subdirectories?
我的文件结构如下所示:
maindir/
- subdir/
- file1.ts
- file2.ts
- file3.ts
- file4.ts
我正在尝试使用ts-interface-builder构建打字稿接口,并且我想匹配并构建所有 4 个file*.ts
文件。 (ts-interface-builder 只是构建类型,这个问题主要是关于 Windows Powershell 中的匹配模式/通配符,因为我已经习惯了 Unix)。
我目前正在使用这个命令:
npx ts-interface-builder ./maindir/*.ts
但这只会构建file3.ts
和file4.ts
。 我可以使用稍微不同的命令:
npx ts-interface-builder ./maindir/*/*.ts
但它只构建file1.ts
和file2.ts
。
我尝试研究 Windows Powershell 通配符,但无法弄清楚。 是否有一个命令,我可以用它来构建所有4个文件?
假设您的npx
命令由 / 从 PowerShell 执行:
npx ts-interface-builder (Get-ChildItem ./maindir -Recurse -Filter *.ts).FullName
另请参阅: Get-ChildItem
cmdlet。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.