hwdef
V2EX  ›  问与答

有会用 powershell 的大神吗,想请教个问题。

  •  
  •   hwdef · Oct 8, 2019 · 1819 views
    This topic created in 2583 days ago, the information mentioned may be changed or developed.

    linux 用

    command ./...
    

    就可以遍历子文件夹的文件

    但是相同的程序和命令在 ps 下貌似不管用

    有大神知道如何修改吗

    qwjhb
    qwjhb
    Oct 8, 2019❤️1
    1
    PS 不是用

    foreach ($file in (Get-ChildItem $path | where { ! $_.PSIsContainer } )){}

    么
    hwdef
    hwdef
    OP
    Oct 8, 2019
    2
    @qwjhb
    这么麻烦吗?
    TangMonk
    TangMonk
    Oct 8, 2019 via iPhone❤️1
    4
    @qwjhb 他想要的是 file glob
    madNeal
    madNeal
    Oct 8, 2019❤️1
    5
    dir . -recurse
    hwdef
    hwdef
    OP
    Oct 8, 2019
    6
    @madNeal
    非常感谢,是这个命令,
    但是我的程序还是没有正确运行,
    可能这个程序本身在 linux 和 win 上就有区别。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5498 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 02:03 · PVG 10:03 · LAX 18:03 · JFK 21:03
    ♥ Do have faith in what you're doing.