在安装完成了 100000000 个软件之后,我 1T 的 C 盘的空间终于不足了,由于安装了大量的特别挑的不专业的软件,强行放在其他的盘将水土不服。于是在老师傅的指导下,我采用了 mklink 神奇命令行,通过 mklink 可以实现将实际的文件放在其他的盘,然后建立链接到原先的地方,在应用上层基本感知不到文件的实际存储地方已经被更换。也就是物理上的文件存放是可以在另一个磁盘上,但软件以为文件还在原来的地方

这是一个不错的方法,我需要处理的文件夹还稍微有点多,就想着写一点小工具,在 Total Commander 里面,辅助我快速完成工作

使用 Total Commander 的一个大优势就是可定制性特别强,例如本文用到的功能就是自定义工具条,新建一个命令按钮,在命令按钮上通过命令行调用的形式,调用到其他工具,例如本文用到的 mklink 工具

本文用到的 mklink 工具属于一个低频使用的功能,不合适作为快捷键,否则过几天就忘了。而做成工具条上的一个按钮,说不定下次我快忘了的时候,还能通过看到这个图标记得有这个功能

在 Total Commander 上给工具条上添加新的按钮的方法有很多,我推荐的就是在工具条上右击,点击更改,进入编辑界面,在编辑界面上添加功能

先点击添加按钮,接着输入命令 cmd 和参数 /C " mklink /d %T%N %P%N " 最后选一个好看的图标就完成了,如下图

使用方法就是,先在一侧选中一个文件夹,然后导航期望建立链接的文件夹到另一侧,点击一下上面新建的按钮即可完成建立文件夹软链接

以上的命令细节就是通过 cmd 调用 mklink 工具建立文件夹软链接

使用 cmd 调用其他命令需要传参数的时候,可选使用 /C 参数,也就是 cmd /C "其他命令行的其他工具" 的格式。另外的 cmd 的可选参数,还请自行谷歌

使用 mklink 时,可选使用 /d 命令建立软链接,细节请参阅 解决 mklink 使用中的各种坑(硬链接,软链接/符号链接,目录链接) - walterlv - 博客园

%T%N 等,这是 Total Commander 提供的参数,可以分别替换为对侧文件夹路径,以及当前选择的文件名或文件夹名,详细请看如下从官方拷贝的描述

%P causes the source path to be inserted into the command line, including a backslash (\) at the end.
%N places the filename under the cursor into the command line.
%T inserts the current target path. Especially useful for packers.
%M places the current filename in the target directory into the command line.
%O places the current filename without extension into the command line.
%E places the current extension (without leading period) into the command line.
%S insert the names of all selected files into the command line. Names containing spaces will be surrounded by double quotes. Please note the maximum command line length of 32767 characters.
%S10
insert the names of the first 10 selected files (max.) into the command line. Allows you to limit the number of file names passed to the program. You can use any other number.
%P%S
insert the names of all selected files into the command line, with full path. Names containing spaces will be surrounded by double quotes. Do NOT put quotes around %P%S yourself!
%R like %S, but with selected names from the target panel
%C1 Like the first parameter of "Compare by content": First selected file, or file under cursor
%C2 Like the second parameter of "Compare by content": Second selected file, or first selected in target panel, or file with same name in target panel. Note: If the right panel is active and less than 2 files are selected, %C1 and %C2 will be reversed.
%C3..%C9
Selected files Nr. 3 .. 9 in source panel, empty if not enough selected
%c1..%c9
Like %C1..%C9, but with 8.3 names and paths
Notes: %N and %M insert the long name, while %n and %m insert the DOS alias name (8.3). %P and %T insert the long path name, and %p and %t the short path name (Same for %o, %e and %s). %p/%t inserts the ftp URL of the directory for ftp connections.
By putting %P, %p, %T or %t directly in front of %S or %s, the path name is inserted with the file name for each file. Example: %P%S inserts the long path and file name for all selected files.
%% inserts the percent-sign.
%L, %l, %F, %f, %D, %d, %WL, %WF, %UL, %UF
create a list file in the TEMP directory with the names of the selected files and directories, and appends the name of the list file to the command line. The list is deleted automatically when the called program quits. Only one list per command is supported. 10 types of list files can be created:
%L Long file names including the complete path, e.g. c:\Program Files\Long name.exe
%l (lowercase L) Short file names including the complete path, e.g. C:\PROGRA~1\LONGNA~1.EXE
%F Long file names without path, e.g. Long name.exe
%f Short file names without path, e.g. LONGNA~1.EXE
%D Short file names including the complete path, but using the DOS character set for accents.
%d Short file names without path, but using the DOS character set for accents.
%UL,%UF
like %L and %F, but with UTF-8 Unicode list file (with byte order mark)
%WL,%WF
like %L and %F, but with a UTF-16 Unicode list file (with byte order mark)
%v Insert virtual file name in case of file system plugins like "virtual panel", where %N pastes the name of the real file (in the file system) to which the entry points to
%V Like %v, but including the full path (including the plugin name)
%X Interprets the following parameters after this parameter as left/right instead of source/target:
%P, %p (left path), %T, %t (right path), %N, %n (left name), %M, %m (right name),
%S, %s (left selected), %R, %r (right selected)
Example: %X%P %T sends left and right path to e.g. an external sync tool
%x Interprets the following parameters after this parameter again as source/target
Example: %X%P %x%P sends left and source path to the called program
%Y anywhere in the parameters: Pass empty list to program when using one of the List parameters like %L. Otherwise, the file under the cursor would be passed.
%Z anywhere in the parameters: Allow to pass archives as path to programs for %P or %T when inside an archive
Example: %Z%P passes name of archive to external tool when TC shows contents of an archive
Only when defining alias commands:
%A Inserts the rest of the entered command line
%A1..%A9
Inserts the first until the ninth parameter.
Example: Alias op points to Command: totalcmd.exe Parameter: /L=%A1 /R=%A2
-> Command line: op c:\dir1 d:\dir2 will create command: totalcmd.exe /L=c:\dir1 /R=d:\dir2

Total Commander 使用 mklink 建立文件夹链接 将 C 盘文件迁移到其他盘的更多相关文章

  1. 用Total Commander for Android管理应用程序

    用Total Commander for Android管理应用程序 前不久安装了一个Total Commander的Anroid版本,除了用它来管理文件之外,我发现用它管理已安装程序挺不错的. 可以 ...

  2. 如何修改Total Commander配件文件的位置

    今天测试了一下Total Commander最新版的安装文件,测试完成后,并删除.结果导致原先一直在使用的绿色版的Total Comander配件文件变成了测试的配件文件,导致许多配置都丢失了,因此不 ...

  3. 【文件拷贝】使用Total Commander Portable拖动拷贝文件,支持队列

    使用Total Commander Portable,可以批量拷贝多个位于相同或不同目录的文件(夹)到指定的相同或不同的目录.这样避免了同时复制多个大的文件造成的速度减慢:将所有任务手动操作之后,剩下 ...

  4. 【荐1】Total Commander 7.57 个人使用设置 及 常用快捷键 备忘

    Total Commander 7.57a  下载地址:http://www.baidu.com/s?wd=total commander 7.57 破解版 软件整体预览图:(注意,下面的版本我用的是 ...

  5. 【荐2】Total Commander 7.57 配置选项 个性化设置备份,,,开启时如何自动最大化???(二)

    最近安装了下新版的“Total Commander 7.56”,发现它的默认设置是如此的不好用,现把对其个性化设置备份如下(符合大部分用户的操作习惯): 默认打开Total Commander 7.5 ...

  6. Total Commander 8.52 Beta 1

    Total Commander 8.52 Beta 1http://www.ghisler.com/852_b1.php 10.08.15 Release Total Commander 8.52 b ...

  7. TC(Total Commander)文件管理神器

    TC文件管理神器 Total Commander是一个会显著提高文件操作效率的工具,而文件操作是应用计算机最基本的功夫,也是伴随一生的操作.因此花一点时间学习,而会受益一世. Total Comman ...

  8. Total Commander 常用快捷键(并附快捷键大全)

    Total Commander 常用快捷键 喜欢用Total Commander的人,都会记住它的一些快捷键,这会给你的操作带来很大的方便,以下是经常会用到的快捷键,大家可以记住一些自己用得最多的操作 ...

  9. SVN的文件夹链接(目录链接,目录映射,svn:externals)

    首先大家可以看下SVN的文件夹链接太强大了!(目录链接,目录映射,svn:externals),我就是看了这篇文章才敢大刀阔斧的把项目里的外链修改成正确的链接. 问题: 我们的项目里,服务器脚本工程s ...

  10. total commander相关设置

    一. 中文语言包 在官方网站上提供有简体中文语言包,下面的说明以此为准.下载的语言包放至Total Commander安装目录下的Language子目录中.从菜单“Configuration”→“Op ...

随机推荐

  1. Deeplink实践原理分析

    目录介绍 01.先看一个场景 02.什么是DeepLink 03.什么是Deferred DeepLink 04.什么是AppLink 05.DeepLink和AppLink核心技术 06.DeepL ...

  2. 「AntV」Vue3与TS框架下使用L7

    1. 引言 Vue是常用的前端框架,TypeScript(简称TS) 是 JavaScript 的超集,可以提高代码的可维护性和可读性 本文基于Vite.Vue3和TypeScript搭建L7开发环境 ...

  3. 记录--Vue 右键菜单的秘密:自适应位置的实现方法

    这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 下图这个情景,你是否也遇到过? 当你右键点击网页上的某个元素时,弹出的菜单被屏幕边缘遮挡了,导致你无法看清或选择菜单项? 上图中右键菜单的 ...

  4. 记录--form 表单恢复初始数据

    这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 form 表单恢复初始数据 在现代的 Web 开发中,表单是不可或缺的组件之一.用户可以通过表单输入和提交数据,而开发者则需要对这些数据进 ...

  5. 记录--写一个高德地图巡航功能的小DEMO

    这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 风格设置 加载地图 使用AMapLoader.load加载地图,从控制台 申请一个属于自己的key import AMapLoader f ...

  6. module的定义及端口的作用

    模型功能 module是verilog中层次划分的基本单元 通过module之间的调用,可以实现硬件描述层次的提高 端口列表则是module的输入输出,和数字电路的走线连接等效 基于module的不断 ...

  7. shk_to_bram

    Entity: shk_to_bram File: shk_to_bram.v Diagram Description Company: FpgaPublish Engineer: FP Create ...

  8. verilog之monitor

    verilog之monitor 1.函数作用 monitor用于追踪变量的变化情况,这在实际使用中还是非常实用的.电路中的某个信号的变化可以通过monitor检测,不需要使用波形图去仔细查找.也便于准 ...

  9. KingbaseES 可更新的视图

    可更新视图 可简化视图可自动更新:系统将允许在视图上使用 INSERT.UPDATE 和 DELETE 语句,就像在常规表上一样.如果视图满足以下所有条件,就是可简化视图,则视图可自动更新: 该视图的 ...

  10. Web、Android等程序开发中src引入外部文件和资源的方法总结

    方法一:使用相对于当前文件(源文件)的相对路径 使用 ../ 对于这个例子来说 ../ 把路径带到了项目根目录的下一级目录 1 <script src="../static/js/wo ...