ScriptSpot home

Forum topic · General Scripting

REVEAL LOCATION IN EXPLORER

By artrender · 2013-02-28

Description

How to reaveal location in explorer so that windows explorer will open and the file will be selected(just like in max)!

Comments (6)
artrender

Thx!

SOLVED!

artrender

Thank you so much!

The last question is how to make /select argument work?


shellLaunch "explorer.exe" "/select" "\\\\S003\maps\001.jpg" 
-- Argument count error: ShellLaunch wanted 2, got 3

shellLaunch "explorer.exe" /select "\\\\S003\maps\001.jpg" 
-- Argument count error: ShellLaunch wanted 2, got 1 

shellLaunch "explorer.exe /select" "\\\\S003\maps\001.jpg"
--false
fajar

you can add /select if only one file... see the MS :

 http://support.microsoft.com/kb/130510

 

 
artrender

the problem with this

If I put


shellLaunch "d:/folder/" "explorer.exe" 
-- it's working

shellLaunch "//s003/folder/" "explorer.exe" 
-- it's not working

shellLaunch "d:/folder/001.jpg" "explorer.exe" 
-- it's working, but it opens file with windows photo viewer

shellLaunch "//s003/folder/001.jpg" "explorer.exe" 
-- it's not working at all

I want it to work all the time locally and from network, and when I use "//s003/folder/001.jpg" I want it to open the folder and inside this folder I want 001.jpg selected

Reply to artrender
PerfectCell

It needs to be like this, with "explorer.exe" first, as that's what you're launching:

shellLaunch "explorer.exe" "d:/folder/"

For network locations, try "////location/derp.jpg" (i.e. use two more // at the start)

PerfectCell

shellLaunch "explorer.exe" ("//")