Open a folder with explorer.exe
bauss
jacobbauss at gmail.com
Sat Dec 28 19:25:48 UTC 2024
On Saturday, 28 December 2024 at 19:23:39 UTC, Jordan Wilson
wrote:
> On Saturday, 28 December 2024 at 18:55:08 UTC, bauss wrote:
>> I cannot figure out how to get spawnProcess working with
>> explorer.exe on Windows.
>>
>> Been trying to call it like:
>>
>> ```
>> spawnProcess(["explorer.exe", path]);
>> ```
>>
>> But it only opens explorer.exe in the documents path and not
>> the path given.
>>
>> I've tried to set the working directory too and it doesn't
>> work either.
>>
>> Can anyone help me? All I want to do is open a specific folder
>> in explorer.exe given a specific path.
>
> This may achieve what you want:
> `spawnProcess(["powershell", "invoke-item", "-path", path]);`
>
> Thanks,
>
> Jordan
Yeah I ended up doing something similar, but with cmd.
More information about the Digitalmars-d-learn
mailing list