Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 如何获得特定路径下所有连接(位置和目标)的列表_Windows_Shell_Cmd_Directory Structure_Junction - Fatal编程技术网

Windows 如何获得特定路径下所有连接(位置和目标)的列表

Windows 如何获得特定路径下所有连接(位置和目标)的列表,windows,shell,cmd,directory-structure,junction,Windows,Shell,Cmd,Directory Structure,Junction,DIR/S/A:DL将搜索所有子文件夹,并且(应该)只列出找到的任何连接,但是输出包含每个文件夹的标题、空行和一些错误结果(参见下面的示例结果) 那么dir/B/S/A:L(作为基础)呢?谢谢@aschipfl。。TBH,我最初实际上在脚本中包含了/B开关,但当我意识到它剥离了更多的信息(即,也删除了源目录名称)时,就将其删除了,因此我需要将源路径合并到输出中。。。不过,如果您只需要一个交叉点目标列表(不需要知道它们在哪里),我非常喜欢(感谢您的建议)作为一个通用/更整洁的解决方案。你可能会对这

DIR/S/A:DL
将搜索所有子文件夹,并且(应该)只列出找到的任何连接,但是输出包含每个文件夹的标题、空行和一些错误结果(参见下面的示例结果)


那么
dir/B/S/A:L
(作为基础)呢?谢谢@aschipfl。。TBH,我最初实际上在脚本中包含了/B开关,但当我意识到它剥离了更多的信息(即,也删除了源目录名称)时,就将其删除了,因此我需要将源路径合并到输出中。。。不过,如果您只需要一个交叉点目标列表(不需要知道它们在哪里),我非常喜欢(感谢您的建议)作为一个通用/更整洁的解决方案。你可能会对这个帖子感兴趣:谢谢@aschipfl——是的,那个家伙的剧本可能会让我非常接近(我想)!。。。稍后我有更多的空闲时间时会查看它,但我希望我可以将他的脚本+与类似
%dpnx~0%
的东西结合起来,在
DIR
沿子DIR遍历时包含完整(当前)路径。谢谢
Directory of d:\OneDrive\Documents\Programming

19/05/2021  16:28    <DIR>          AutoHotKey
14/05/2021  19:39    <JUNCTION>     WindowsPowerShell [D:\OneDrive\Documents\Programming\PowerShell]
               0 File(s)              0 bytes

Directory of d:\OneDrive\Music

30/03/2021  22:18    <JUNCTION>     Playlists [D:\OneDrive\Videos\.Docs\Playlists]
24/04/2021  02:27    <JUNCTION>     Sound recordings [D:\OneDrive\Documents\Sound recordings]
               0 File(s)              0 bytes
14/05/2021  19:39    <JUNCTION>     WindowsPowerShell [D:\OneDrive\Documents\Programming\PowerShell]
30/03/2021  22:18    <JUNCTION>     Playlists [D:\OneDrive\Videos\.Docs\Playlists]
24/04/2021  02:27    <JUNCTION>     Sound recordings [D:\OneDrive\Documents\Sound recordings]
Source                                               Target
---------------------------------------------------  ---------------------------------------------------
D:\OneDrive\Documents\Programming\WindowsPowerShell, D:\OneDrive\Documents\Programming\PowerShell
D:\OneDrive\Music\Playlists,                         D:\OneDrive\Videos\.Docs\Playlists
D:\OneDrive\Music\Sound recordings,                  D:\OneDrive\Documents\Sound recordings