Checking where a symbolic link points at in Windows 7
up vote
20
down vote
favorite
In Windows 7, how can I check if a file is a symbolic link or not, if a folder is a junction or not, and how can I check where they are pointing at (in case they are symlink/junction). Both in Explorer and in Command line.
It's very important to have a way to do it from command line, in order to know how to duplicate symbolic links on another computer when you want to make an exact replica of a folder tree.
If I right click on a file and check "Properties", I can't find any indication that it's a symbolic link.
windows-7 command-line symbolic-link
migrated from stackoverflow.com Dec 27 '12 at 5:48
This question came from our site for professional and enthusiast programmers.
add a comment |
up vote
20
down vote
favorite
In Windows 7, how can I check if a file is a symbolic link or not, if a folder is a junction or not, and how can I check where they are pointing at (in case they are symlink/junction). Both in Explorer and in Command line.
It's very important to have a way to do it from command line, in order to know how to duplicate symbolic links on another computer when you want to make an exact replica of a folder tree.
If I right click on a file and check "Properties", I can't find any indication that it's a symbolic link.
windows-7 command-line symbolic-link
migrated from stackoverflow.com Dec 27 '12 at 5:48
This question came from our site for professional and enthusiast programmers.
add a comment |
up vote
20
down vote
favorite
up vote
20
down vote
favorite
In Windows 7, how can I check if a file is a symbolic link or not, if a folder is a junction or not, and how can I check where they are pointing at (in case they are symlink/junction). Both in Explorer and in Command line.
It's very important to have a way to do it from command line, in order to know how to duplicate symbolic links on another computer when you want to make an exact replica of a folder tree.
If I right click on a file and check "Properties", I can't find any indication that it's a symbolic link.
windows-7 command-line symbolic-link
In Windows 7, how can I check if a file is a symbolic link or not, if a folder is a junction or not, and how can I check where they are pointing at (in case they are symlink/junction). Both in Explorer and in Command line.
It's very important to have a way to do it from command line, in order to know how to duplicate symbolic links on another computer when you want to make an exact replica of a folder tree.
If I right click on a file and check "Properties", I can't find any indication that it's a symbolic link.
windows-7 command-line symbolic-link
windows-7 command-line symbolic-link
edited Jan 21 '17 at 6:53
Steven Penny
4,0891583133
4,0891583133
asked Nov 22 '12 at 7:56
BearCode
4393718
4393718
migrated from stackoverflow.com Dec 27 '12 at 5:48
This question came from our site for professional and enthusiast programmers.
migrated from stackoverflow.com Dec 27 '12 at 5:48
This question came from our site for professional and enthusiast programmers.
add a comment |
add a comment |
5 Answers
5
active
oldest
votes
up vote
16
down vote
accepted
The dir command dir /a
can do this:
2012-12-26 09:30 PM <DIR> .
2012-12-26 09:30 PM <DIR> ..
2012-12-26 09:30 PM 0 a.txt
2012-12-26 09:30 PM <SYMLINK> link.txt [a.txt]
Alternatively, you can use Windows Explorer:
Right click column, More, Link Target
This doesn't work in windows 7 (Microsoft Windows [Version 6.1.7601])
– gonzalezea
Mar 24 '16 at 14:00
@gonzalezea yeah, it does. It worked with Windows 7 back in 2012 when I posted this, and it works now too
– Steven Penny
Mar 24 '16 at 15:22
Perhaps not so obvious to new users, this is a command line solution. The user must open a command prompt, then change directory (using the CD command) to a directory containing a symbolic link, then type the DIR command and press the 'enter' key. Running the DIR command in the wrong directory is a common mistake. But understandable, unless you are sure which directory a symlink is in (not always obvious, as the Windows GUI does not explicitly tell you whether a particular directory contains any symlinks or junctions). Look for a shortcut that has the type FILE FOLDER instead of SHORTCUT.
– Ed999
Jan 20 '17 at 16:28
2
The link target field is empty on windows 7
– Ronen Festinger
Jul 10 '17 at 13:42
1
from the command line you should type indir /a
then press Enter. If you do not include the /a, windows does not list junction points. You can try the difference betweendir
anddir /a
on directoryUsersYourUsername
– Paulus
Dec 21 '17 at 8:50
add a comment |
up vote
4
down vote
Copied from StackOverFlow, I just used this line, and it works
fsutil reparsepoint query "folder name" | find "Symbolic Link" >nul && echo symbolic link found || echo No symbolic link
Explanation:
From MSDN about FSUtil :
Performs tasks that are related to file allocation table (FAT) and NTFS file systems, such as managing reparse points, managing sparse files, or dismounting a volume. If it is used without parameters, fsutil displays a list of supported subcommands.
For our use, we just care that it outputs a line that has "Symbolic Link" in it, if it's symbolic, which we then find
, and if find
succeeds, we output one thing, if it doesn't, we output something else.
Notes:
- The quotes around the folder name are required if the path has spaces in it.
- It gives the same output whether the folder doesn't exist, or isn't a symlink, use with caution.
add a comment |
up vote
0
down vote
Here is a cygwin bash script to save symlinks,
add your favourite folders to first line
find c:/ C:/Users/$USERNAME/SendTo C:/Users/$USERNAME/Desktop
-maxdepth 2 -type l
-printf 'mklinkt/Dt"%p"t"%l"n' |
perl -pne '
s!/cygdrive/(w)/!1:/!g;
s,/a/,/%USERNAME%/,g;
1;' |
sort -f | uniq > restore-links.cmd
add a comment |
up vote
0
down vote
In Powershell:
dir | select Name, LinkType
1
Especially because this is an old question that already has good answers, explaining what your answer adds and what each portion of the command is doing is an easy way to make it better.
– music2myear
Jun 8 at 22:00
add a comment |
up vote
0
down vote
Using PowerShell, on at least Windows OS, you can find symbolic-links in any given directory, such as the following:
Get-ChildItem 'C:nodejsbin' | Where-Object {$_.LinkType -eq 'SymbolicLink'}
A more concise alternative would be to use Get-ChildItem
's alias ls
:
ls 'C:nodejs' -Attributes ReparsePoint -Recurse
And you can get relevant information on a symbolic-link by doing any of the following:
Get the file item and output its Target property. Target being the "value" of the symbolic-link. In an addition, method or command signatures for creating symlinks when juxtaposing between operating systems, the arguments names of: 'target', 'path' and/or 'value' may hold different meanings than another method signature on a different OS.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Target
E:AIToutdependency_symlink.cmd
Get the file item and output its LinkType property. An item with a LinkType value of SymbolicLink means that its, well, symbolic.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty LinkType
SymbolicLink
Get the file item and output its Mode property. An item with l
in the Mode value indicates that it is a symbolic-link.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Mode
-a---l
Get the file item and output its Attributes property. An item attributed with a ReparsePoint value maybe indicative to a symbolic-link.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Attributes
Archive, ReparsePoint
add a comment |
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
16
down vote
accepted
The dir command dir /a
can do this:
2012-12-26 09:30 PM <DIR> .
2012-12-26 09:30 PM <DIR> ..
2012-12-26 09:30 PM 0 a.txt
2012-12-26 09:30 PM <SYMLINK> link.txt [a.txt]
Alternatively, you can use Windows Explorer:
Right click column, More, Link Target
This doesn't work in windows 7 (Microsoft Windows [Version 6.1.7601])
– gonzalezea
Mar 24 '16 at 14:00
@gonzalezea yeah, it does. It worked with Windows 7 back in 2012 when I posted this, and it works now too
– Steven Penny
Mar 24 '16 at 15:22
Perhaps not so obvious to new users, this is a command line solution. The user must open a command prompt, then change directory (using the CD command) to a directory containing a symbolic link, then type the DIR command and press the 'enter' key. Running the DIR command in the wrong directory is a common mistake. But understandable, unless you are sure which directory a symlink is in (not always obvious, as the Windows GUI does not explicitly tell you whether a particular directory contains any symlinks or junctions). Look for a shortcut that has the type FILE FOLDER instead of SHORTCUT.
– Ed999
Jan 20 '17 at 16:28
2
The link target field is empty on windows 7
– Ronen Festinger
Jul 10 '17 at 13:42
1
from the command line you should type indir /a
then press Enter. If you do not include the /a, windows does not list junction points. You can try the difference betweendir
anddir /a
on directoryUsersYourUsername
– Paulus
Dec 21 '17 at 8:50
add a comment |
up vote
16
down vote
accepted
The dir command dir /a
can do this:
2012-12-26 09:30 PM <DIR> .
2012-12-26 09:30 PM <DIR> ..
2012-12-26 09:30 PM 0 a.txt
2012-12-26 09:30 PM <SYMLINK> link.txt [a.txt]
Alternatively, you can use Windows Explorer:
Right click column, More, Link Target
This doesn't work in windows 7 (Microsoft Windows [Version 6.1.7601])
– gonzalezea
Mar 24 '16 at 14:00
@gonzalezea yeah, it does. It worked with Windows 7 back in 2012 when I posted this, and it works now too
– Steven Penny
Mar 24 '16 at 15:22
Perhaps not so obvious to new users, this is a command line solution. The user must open a command prompt, then change directory (using the CD command) to a directory containing a symbolic link, then type the DIR command and press the 'enter' key. Running the DIR command in the wrong directory is a common mistake. But understandable, unless you are sure which directory a symlink is in (not always obvious, as the Windows GUI does not explicitly tell you whether a particular directory contains any symlinks or junctions). Look for a shortcut that has the type FILE FOLDER instead of SHORTCUT.
– Ed999
Jan 20 '17 at 16:28
2
The link target field is empty on windows 7
– Ronen Festinger
Jul 10 '17 at 13:42
1
from the command line you should type indir /a
then press Enter. If you do not include the /a, windows does not list junction points. You can try the difference betweendir
anddir /a
on directoryUsersYourUsername
– Paulus
Dec 21 '17 at 8:50
add a comment |
up vote
16
down vote
accepted
up vote
16
down vote
accepted
The dir command dir /a
can do this:
2012-12-26 09:30 PM <DIR> .
2012-12-26 09:30 PM <DIR> ..
2012-12-26 09:30 PM 0 a.txt
2012-12-26 09:30 PM <SYMLINK> link.txt [a.txt]
Alternatively, you can use Windows Explorer:
Right click column, More, Link Target
The dir command dir /a
can do this:
2012-12-26 09:30 PM <DIR> .
2012-12-26 09:30 PM <DIR> ..
2012-12-26 09:30 PM 0 a.txt
2012-12-26 09:30 PM <SYMLINK> link.txt [a.txt]
Alternatively, you can use Windows Explorer:
Right click column, More, Link Target
edited Nov 20 at 23:43
Albin
2,2951129
2,2951129
answered Dec 27 '12 at 3:33
Steven Penny
4,0891583133
4,0891583133
This doesn't work in windows 7 (Microsoft Windows [Version 6.1.7601])
– gonzalezea
Mar 24 '16 at 14:00
@gonzalezea yeah, it does. It worked with Windows 7 back in 2012 when I posted this, and it works now too
– Steven Penny
Mar 24 '16 at 15:22
Perhaps not so obvious to new users, this is a command line solution. The user must open a command prompt, then change directory (using the CD command) to a directory containing a symbolic link, then type the DIR command and press the 'enter' key. Running the DIR command in the wrong directory is a common mistake. But understandable, unless you are sure which directory a symlink is in (not always obvious, as the Windows GUI does not explicitly tell you whether a particular directory contains any symlinks or junctions). Look for a shortcut that has the type FILE FOLDER instead of SHORTCUT.
– Ed999
Jan 20 '17 at 16:28
2
The link target field is empty on windows 7
– Ronen Festinger
Jul 10 '17 at 13:42
1
from the command line you should type indir /a
then press Enter. If you do not include the /a, windows does not list junction points. You can try the difference betweendir
anddir /a
on directoryUsersYourUsername
– Paulus
Dec 21 '17 at 8:50
add a comment |
This doesn't work in windows 7 (Microsoft Windows [Version 6.1.7601])
– gonzalezea
Mar 24 '16 at 14:00
@gonzalezea yeah, it does. It worked with Windows 7 back in 2012 when I posted this, and it works now too
– Steven Penny
Mar 24 '16 at 15:22
Perhaps not so obvious to new users, this is a command line solution. The user must open a command prompt, then change directory (using the CD command) to a directory containing a symbolic link, then type the DIR command and press the 'enter' key. Running the DIR command in the wrong directory is a common mistake. But understandable, unless you are sure which directory a symlink is in (not always obvious, as the Windows GUI does not explicitly tell you whether a particular directory contains any symlinks or junctions). Look for a shortcut that has the type FILE FOLDER instead of SHORTCUT.
– Ed999
Jan 20 '17 at 16:28
2
The link target field is empty on windows 7
– Ronen Festinger
Jul 10 '17 at 13:42
1
from the command line you should type indir /a
then press Enter. If you do not include the /a, windows does not list junction points. You can try the difference betweendir
anddir /a
on directoryUsersYourUsername
– Paulus
Dec 21 '17 at 8:50
This doesn't work in windows 7 (Microsoft Windows [Version 6.1.7601])
– gonzalezea
Mar 24 '16 at 14:00
This doesn't work in windows 7 (Microsoft Windows [Version 6.1.7601])
– gonzalezea
Mar 24 '16 at 14:00
@gonzalezea yeah, it does. It worked with Windows 7 back in 2012 when I posted this, and it works now too
– Steven Penny
Mar 24 '16 at 15:22
@gonzalezea yeah, it does. It worked with Windows 7 back in 2012 when I posted this, and it works now too
– Steven Penny
Mar 24 '16 at 15:22
Perhaps not so obvious to new users, this is a command line solution. The user must open a command prompt, then change directory (using the CD command) to a directory containing a symbolic link, then type the DIR command and press the 'enter' key. Running the DIR command in the wrong directory is a common mistake. But understandable, unless you are sure which directory a symlink is in (not always obvious, as the Windows GUI does not explicitly tell you whether a particular directory contains any symlinks or junctions). Look for a shortcut that has the type FILE FOLDER instead of SHORTCUT.
– Ed999
Jan 20 '17 at 16:28
Perhaps not so obvious to new users, this is a command line solution. The user must open a command prompt, then change directory (using the CD command) to a directory containing a symbolic link, then type the DIR command and press the 'enter' key. Running the DIR command in the wrong directory is a common mistake. But understandable, unless you are sure which directory a symlink is in (not always obvious, as the Windows GUI does not explicitly tell you whether a particular directory contains any symlinks or junctions). Look for a shortcut that has the type FILE FOLDER instead of SHORTCUT.
– Ed999
Jan 20 '17 at 16:28
2
2
The link target field is empty on windows 7
– Ronen Festinger
Jul 10 '17 at 13:42
The link target field is empty on windows 7
– Ronen Festinger
Jul 10 '17 at 13:42
1
1
from the command line you should type in
dir /a
then press Enter. If you do not include the /a, windows does not list junction points. You can try the difference between dir
and dir /a
on directory UsersYourUsername
– Paulus
Dec 21 '17 at 8:50
from the command line you should type in
dir /a
then press Enter. If you do not include the /a, windows does not list junction points. You can try the difference between dir
and dir /a
on directory UsersYourUsername
– Paulus
Dec 21 '17 at 8:50
add a comment |
up vote
4
down vote
Copied from StackOverFlow, I just used this line, and it works
fsutil reparsepoint query "folder name" | find "Symbolic Link" >nul && echo symbolic link found || echo No symbolic link
Explanation:
From MSDN about FSUtil :
Performs tasks that are related to file allocation table (FAT) and NTFS file systems, such as managing reparse points, managing sparse files, or dismounting a volume. If it is used without parameters, fsutil displays a list of supported subcommands.
For our use, we just care that it outputs a line that has "Symbolic Link" in it, if it's symbolic, which we then find
, and if find
succeeds, we output one thing, if it doesn't, we output something else.
Notes:
- The quotes around the folder name are required if the path has spaces in it.
- It gives the same output whether the folder doesn't exist, or isn't a symlink, use with caution.
add a comment |
up vote
4
down vote
Copied from StackOverFlow, I just used this line, and it works
fsutil reparsepoint query "folder name" | find "Symbolic Link" >nul && echo symbolic link found || echo No symbolic link
Explanation:
From MSDN about FSUtil :
Performs tasks that are related to file allocation table (FAT) and NTFS file systems, such as managing reparse points, managing sparse files, or dismounting a volume. If it is used without parameters, fsutil displays a list of supported subcommands.
For our use, we just care that it outputs a line that has "Symbolic Link" in it, if it's symbolic, which we then find
, and if find
succeeds, we output one thing, if it doesn't, we output something else.
Notes:
- The quotes around the folder name are required if the path has spaces in it.
- It gives the same output whether the folder doesn't exist, or isn't a symlink, use with caution.
add a comment |
up vote
4
down vote
up vote
4
down vote
Copied from StackOverFlow, I just used this line, and it works
fsutil reparsepoint query "folder name" | find "Symbolic Link" >nul && echo symbolic link found || echo No symbolic link
Explanation:
From MSDN about FSUtil :
Performs tasks that are related to file allocation table (FAT) and NTFS file systems, such as managing reparse points, managing sparse files, or dismounting a volume. If it is used without parameters, fsutil displays a list of supported subcommands.
For our use, we just care that it outputs a line that has "Symbolic Link" in it, if it's symbolic, which we then find
, and if find
succeeds, we output one thing, if it doesn't, we output something else.
Notes:
- The quotes around the folder name are required if the path has spaces in it.
- It gives the same output whether the folder doesn't exist, or isn't a symlink, use with caution.
Copied from StackOverFlow, I just used this line, and it works
fsutil reparsepoint query "folder name" | find "Symbolic Link" >nul && echo symbolic link found || echo No symbolic link
Explanation:
From MSDN about FSUtil :
Performs tasks that are related to file allocation table (FAT) and NTFS file systems, such as managing reparse points, managing sparse files, or dismounting a volume. If it is used without parameters, fsutil displays a list of supported subcommands.
For our use, we just care that it outputs a line that has "Symbolic Link" in it, if it's symbolic, which we then find
, and if find
succeeds, we output one thing, if it doesn't, we output something else.
Notes:
- The quotes around the folder name are required if the path has spaces in it.
- It gives the same output whether the folder doesn't exist, or isn't a symlink, use with caution.
edited May 23 '17 at 12:41
Community♦
1
1
answered Dec 20 '15 at 8:21
Cat Boss
20529
20529
add a comment |
add a comment |
up vote
0
down vote
Here is a cygwin bash script to save symlinks,
add your favourite folders to first line
find c:/ C:/Users/$USERNAME/SendTo C:/Users/$USERNAME/Desktop
-maxdepth 2 -type l
-printf 'mklinkt/Dt"%p"t"%l"n' |
perl -pne '
s!/cygdrive/(w)/!1:/!g;
s,/a/,/%USERNAME%/,g;
1;' |
sort -f | uniq > restore-links.cmd
add a comment |
up vote
0
down vote
Here is a cygwin bash script to save symlinks,
add your favourite folders to first line
find c:/ C:/Users/$USERNAME/SendTo C:/Users/$USERNAME/Desktop
-maxdepth 2 -type l
-printf 'mklinkt/Dt"%p"t"%l"n' |
perl -pne '
s!/cygdrive/(w)/!1:/!g;
s,/a/,/%USERNAME%/,g;
1;' |
sort -f | uniq > restore-links.cmd
add a comment |
up vote
0
down vote
up vote
0
down vote
Here is a cygwin bash script to save symlinks,
add your favourite folders to first line
find c:/ C:/Users/$USERNAME/SendTo C:/Users/$USERNAME/Desktop
-maxdepth 2 -type l
-printf 'mklinkt/Dt"%p"t"%l"n' |
perl -pne '
s!/cygdrive/(w)/!1:/!g;
s,/a/,/%USERNAME%/,g;
1;' |
sort -f | uniq > restore-links.cmd
Here is a cygwin bash script to save symlinks,
add your favourite folders to first line
find c:/ C:/Users/$USERNAME/SendTo C:/Users/$USERNAME/Desktop
-maxdepth 2 -type l
-printf 'mklinkt/Dt"%p"t"%l"n' |
perl -pne '
s!/cygdrive/(w)/!1:/!g;
s,/a/,/%USERNAME%/,g;
1;' |
sort -f | uniq > restore-links.cmd
answered Oct 1 '16 at 3:37
mosh
21727
21727
add a comment |
add a comment |
up vote
0
down vote
In Powershell:
dir | select Name, LinkType
1
Especially because this is an old question that already has good answers, explaining what your answer adds and what each portion of the command is doing is an easy way to make it better.
– music2myear
Jun 8 at 22:00
add a comment |
up vote
0
down vote
In Powershell:
dir | select Name, LinkType
1
Especially because this is an old question that already has good answers, explaining what your answer adds and what each portion of the command is doing is an easy way to make it better.
– music2myear
Jun 8 at 22:00
add a comment |
up vote
0
down vote
up vote
0
down vote
In Powershell:
dir | select Name, LinkType
In Powershell:
dir | select Name, LinkType
answered Jun 8 at 21:03
John
1217
1217
1
Especially because this is an old question that already has good answers, explaining what your answer adds and what each portion of the command is doing is an easy way to make it better.
– music2myear
Jun 8 at 22:00
add a comment |
1
Especially because this is an old question that already has good answers, explaining what your answer adds and what each portion of the command is doing is an easy way to make it better.
– music2myear
Jun 8 at 22:00
1
1
Especially because this is an old question that already has good answers, explaining what your answer adds and what each portion of the command is doing is an easy way to make it better.
– music2myear
Jun 8 at 22:00
Especially because this is an old question that already has good answers, explaining what your answer adds and what each portion of the command is doing is an easy way to make it better.
– music2myear
Jun 8 at 22:00
add a comment |
up vote
0
down vote
Using PowerShell, on at least Windows OS, you can find symbolic-links in any given directory, such as the following:
Get-ChildItem 'C:nodejsbin' | Where-Object {$_.LinkType -eq 'SymbolicLink'}
A more concise alternative would be to use Get-ChildItem
's alias ls
:
ls 'C:nodejs' -Attributes ReparsePoint -Recurse
And you can get relevant information on a symbolic-link by doing any of the following:
Get the file item and output its Target property. Target being the "value" of the symbolic-link. In an addition, method or command signatures for creating symlinks when juxtaposing between operating systems, the arguments names of: 'target', 'path' and/or 'value' may hold different meanings than another method signature on a different OS.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Target
E:AIToutdependency_symlink.cmd
Get the file item and output its LinkType property. An item with a LinkType value of SymbolicLink means that its, well, symbolic.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty LinkType
SymbolicLink
Get the file item and output its Mode property. An item with l
in the Mode value indicates that it is a symbolic-link.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Mode
-a---l
Get the file item and output its Attributes property. An item attributed with a ReparsePoint value maybe indicative to a symbolic-link.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Attributes
Archive, ReparsePoint
add a comment |
up vote
0
down vote
Using PowerShell, on at least Windows OS, you can find symbolic-links in any given directory, such as the following:
Get-ChildItem 'C:nodejsbin' | Where-Object {$_.LinkType -eq 'SymbolicLink'}
A more concise alternative would be to use Get-ChildItem
's alias ls
:
ls 'C:nodejs' -Attributes ReparsePoint -Recurse
And you can get relevant information on a symbolic-link by doing any of the following:
Get the file item and output its Target property. Target being the "value" of the symbolic-link. In an addition, method or command signatures for creating symlinks when juxtaposing between operating systems, the arguments names of: 'target', 'path' and/or 'value' may hold different meanings than another method signature on a different OS.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Target
E:AIToutdependency_symlink.cmd
Get the file item and output its LinkType property. An item with a LinkType value of SymbolicLink means that its, well, symbolic.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty LinkType
SymbolicLink
Get the file item and output its Mode property. An item with l
in the Mode value indicates that it is a symbolic-link.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Mode
-a---l
Get the file item and output its Attributes property. An item attributed with a ReparsePoint value maybe indicative to a symbolic-link.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Attributes
Archive, ReparsePoint
add a comment |
up vote
0
down vote
up vote
0
down vote
Using PowerShell, on at least Windows OS, you can find symbolic-links in any given directory, such as the following:
Get-ChildItem 'C:nodejsbin' | Where-Object {$_.LinkType -eq 'SymbolicLink'}
A more concise alternative would be to use Get-ChildItem
's alias ls
:
ls 'C:nodejs' -Attributes ReparsePoint -Recurse
And you can get relevant information on a symbolic-link by doing any of the following:
Get the file item and output its Target property. Target being the "value" of the symbolic-link. In an addition, method or command signatures for creating symlinks when juxtaposing between operating systems, the arguments names of: 'target', 'path' and/or 'value' may hold different meanings than another method signature on a different OS.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Target
E:AIToutdependency_symlink.cmd
Get the file item and output its LinkType property. An item with a LinkType value of SymbolicLink means that its, well, symbolic.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty LinkType
SymbolicLink
Get the file item and output its Mode property. An item with l
in the Mode value indicates that it is a symbolic-link.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Mode
-a---l
Get the file item and output its Attributes property. An item attributed with a ReparsePoint value maybe indicative to a symbolic-link.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Attributes
Archive, ReparsePoint
Using PowerShell, on at least Windows OS, you can find symbolic-links in any given directory, such as the following:
Get-ChildItem 'C:nodejsbin' | Where-Object {$_.LinkType -eq 'SymbolicLink'}
A more concise alternative would be to use Get-ChildItem
's alias ls
:
ls 'C:nodejs' -Attributes ReparsePoint -Recurse
And you can get relevant information on a symbolic-link by doing any of the following:
Get the file item and output its Target property. Target being the "value" of the symbolic-link. In an addition, method or command signatures for creating symlinks when juxtaposing between operating systems, the arguments names of: 'target', 'path' and/or 'value' may hold different meanings than another method signature on a different OS.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Target
E:AIToutdependency_symlink.cmd
Get the file item and output its LinkType property. An item with a LinkType value of SymbolicLink means that its, well, symbolic.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty LinkType
SymbolicLink
Get the file item and output its Mode property. An item with l
in the Mode value indicates that it is a symbolic-link.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Mode
-a---l
Get the file item and output its Attributes property. An item attributed with a ReparsePoint value maybe indicative to a symbolic-link.
E:AIT> Get-Item -Path 'C:nodejsbinionic.cmd' | Select-Object -ExpandProperty Attributes
Archive, ReparsePoint
edited Nov 21 at 15:59
answered Nov 20 at 22:36
marckassay
1962
1962
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f524669%2fchecking-where-a-symbolic-link-points-at-in-windows-7%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown