V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
hwdef
V2EX  ›  问与答

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

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

    linux 用

    command ./...
    

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

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

    有大神知道如何修改吗

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

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

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