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.

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

Method 2

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

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 click OK. Double-click the file opentargetdir.vbs to run it. When you see the following prompt, click OK.



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.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support, my reader. It won't take more than 10 seconds of your time. The share buttons are right below. :)

About the author

Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and he has been a Microsoft Most Valuable Professional (MVP) for 10 consecutive years from 2003 to 2012.

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

  1. 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”.

  2. Super cool!!

    Thanks very, very much for the reg entry!!

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

    Thank you!!

  3. 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.