Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vbscript open folder in same explorer window

Tags:

wsh

vbscript

I am not so good in VBScript at all, but thanks to Google I was able to put together script which is able to open file path in explorer.exe

I would like to open the specific path in same window not in the new one. Is VBScript able to do it?

Here is my code:

Dim SH, FolderToOpen 
Set SH = WScript.CreateObject("WScript.Shell") 
FolderToOpen = "C:\path\to\my\folder" 
SH.Run FolderToOpen 
Set SH = Nothing 

Thank you for your advice.

like image 658
easy4mer Avatar asked Nov 04 '25 11:11

easy4mer


1 Answers

Try this:

Set WshShell = CreateObject("WScript.Shell")

WshShell.Run Target
like image 67
Naoufal EL JAOUHARI Avatar answered Nov 07 '25 14:11

Naoufal EL JAOUHARI



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!