【问题标题】:change to directory of batch script output切换到批处理脚本输出目录
【发布时间】:2016-02-10 16:23:21
【问题描述】:

我想将目录更改为以下命令的输出。

这在 Linux 上很容易,有没有办法用批处理脚本来做到这一点。

     wmic share get path | findstr /i "test" | cd %????????????

谢谢

【问题讨论】:

    标签: windows batch-file scripting


    【解决方案1】:
    for /f "delims=" %%a in ('wmic share get path ^| findstr /i "test" ') do cd "%%a"
    

    我相信应该能带你到那里。

    【讨论】:

    • Magoo,先生,您太棒了,我的 Windows 脚本很糟糕,我会在这里待几天的。谢谢
    猜你喜欢
    • 2015-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-11
    • 1970-01-01
    • 1970-01-01
    • 2022-06-18
    • 2013-07-27
    相关资源
    最近更新 更多