Question about Windows XP junctions and links

benwood

Member
Feb 15, 2004
107
0
0
Is there a way to list all the junctions and symbolic links used on a computer running Windows XP and save that listing to a text file?
 

benwood

Member
Feb 15, 2004
107
0
0
I get the error message "Junction is not recognized as a internal or external command" whenever I try to execute any of the commands given in this thread. Also there are several disks on the computer running XP Pro SP2 that have junction points on them. Will any of the commands given work across more than the C: disk? Thanks.
 

Bubbaleone

Golden Member
Nov 20, 2011
1,803
4
76
I don't think you understood; click the TechNet Sysinternals link that MrChad posted and download Junction v1.06. It's a zip file, so you'll need to extract 'junction.exe'. Since you're running XP Pro it would be easiest to just copy junction.exe to the root of your system drive (C:\junction.exe). When you open a command prompt, navigate to C:\ and 'junction' will be available from the commandline ( C:\>junction ). Here are examples of syntax:

Using Junction

Usage: [-s]

-s (Recurse subdirectories)

Examples:

To determine if a file is a junction, specify the file name:

C:\>junction c:\test

To list junctions beneath a directory, include the –s switch:

C:\>junction -s c:\

To create a junction c:\Program-Files for "c:\Program Files":

C:\>md Program-Files

C:\>junction c:\Program-Files "c:\Program Files"

To delete a junction, use the –d switch:

C:\>junction -d c:\Program-Files

To answer your question; yes, junction.exe can parse any drive. In the above example of how "To list junctions beneath a directory, include the –s switch:" this command is used:

C:\>junction -s C:\

...which will recursively display all junctions under C:\.

To display another drive or volume simply change directories:

C:\>junction -s E:\


.