小编Poo*_*oja的帖子

用于在特定目录中启动powershell的批处理文件

我正在通过《Learn python the Hard way》一书学习Python编程。因此我使用 powershell 来运行我的程序。由于每次启动 powershell 时都必须手动更改目录,因此我编写了一个批处理文件来自动化它。

我写的命令是:

powershell.exe -noexit -command "'cd c:\self\pooja\"edu n career"\programs\python'"
Run Code Online (Sandbox Code Playgroud)

问题是它运行但仅打开“程序”目录。为什么它没有更改为 python 目录?

最后,我通过在 powershell 的快捷方式属性中设置“开始于”字段来完成此操作,但我想知道为什么批处理文件没有按预期工作。

windows powershell batch

3
推荐指数
1
解决办法
8978
查看次数

标签 统计

batch ×1

powershell ×1

windows ×1