How to Add “Open File Location” Right-Click Option in Windows XP

Windows Vista and Windows 7 include the Open file location context menu item for Shortcuts, which help you quickly open the target folder of a shortcut. In Windows XP, it takes four mouse clicks to accomplish the task. To open the target folder of a shortcut in Windows XP, you need to right-click on the shortcut file, click Properties and click the Find Target button to open the parent folder of the target file or folder. And an additional mouse click is needed to close the Shortcut Properties dialog.

You can add the Open file location feature in Windows XP (similar to what you have in Windows Vista) using one of the two methods. Method 1 uses a .REG file, and Method 2 uses a VBScript that I wrote. No additional shell extensions are needed!

Note: The only drawback of Method 1 is that the Open file location command will be seen in the context menu of every file and folder, not only for shortcuts. If you need the Open file location command shown only for shortcuts (.lnk files), then you may use my VBScript which is discussed in Method 2 below.

Method 1

Download findtarget.reg and save to Desktop. Right-click on the file and choose Merge. The Open file location command is added to the context menu for all files.

(Credits to Tweak of PlanetAMD64 forums for this .REG file tip.)

To remove the option, use the findtarget-undo.reg file.

Method 2

Here is a VBScript that I wrote which adds a Open file location functionality in the context menu of shortcuts (.lnk files)



1. Download opentargetdir.zip extract and save the Script file opentargetdir.vbs to your Windows folder. To open the Windows folder in your system, type %systemroot% in Start, Run dialog and press {ENTER}.

2. Double-click the file opentargetdir.vbs to run it. When you see the following prompt, simply press {ENTER}.

The Open file location command is now added to the context menu for shortcuts.

Uninstallation

As the dialog says, type UNINSTALL and press ENTER if you want to remove the Open file location command from the context menu. Then delete the file opentargetdir.vbs from your Windows directory.

See Also

About the author

Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and has a vast experience in Windows — delivering support for Microsoft's consumer products. He has been a Microsoft MVP (2003-2012) who contributes to various Windows support forums.

9 thoughts on “How to Add “Open File Location” Right-Click Option in Windows XP”

  1. Amaziiiiing!!! Better than OpenTarget because OpenTarget uses Windows Explorer when opening the file location for the shortcut.

  2. Just a small fix: You should only add the option to lnk files and not every file and folder, because there is no point in “finding the folder in which you are currently in”.

  3. TreeView as DEFAULT

    Been looking for this for a long time, and glad it work:)

    Tools -> Folder Options -> File Types -> hi-lite ‘Folder’ -> click ‘Advanced’ -> hi-lite ‘explore’ -> click ‘Set Default’

    thats all

  4. Super cool!!

    Thanks very, very much for the reg entry!!

    wizards like you make it super easy for users like me!!

    Thank you!!

  5. You can also do this with the free File Menu Tools utility by adding a custom command referencing explorer.exe with the FOLDERPATH argument and set Element Types to “lnk”

    This will add a context menu option to shortcuts that will perform the same action as the Find Target properties button.

  6. bj,
    pour traiter les liens dont la cible commence par ‘cmd.exe /c ‘
    (ce qui permet de fixer une icone application conservée dans la barre de tâche Windows),
    j ai ajouté ces lignes dans le VBS:

    filespec = WScript.Arguments.Item(0)
    ‘ C:\Windows\System32\cmd.exe /c “X:\…\—.bat”
    set oShortcut = WshShell.CreateShortcut(filespec)

    strTarget = oShortcut.TargetPath & ” ” & oShortcut.arguments
    strTarget = Replace(strTarget, “C:\Windows\System32\cmd.exe /c “, “”, 1, -1)
    strTarget = Replace(strTarget, “cmd.exe /c “, “”, 1, -1)
    strTarget = Replace(strTarget, “C:\Windows\System32\cmd.exe “, “”, 1, -1)
    strTarget = Replace(strTarget, “cmd.exe “, “”, 1, -1)
    strTarget = Replace(strTarget, “”””, “”, 1, -1)

    If fso.FileExists(strTarget) Then

    (ainsi on ouvre le bon emplacement du .bat et pas l’emplacement de cmd.exe)
    😉

Comments are closed.