在安装完成了 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. 记录--实现一个鼠标框选的功能,要怎么实现和设计 api?

    这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 前言 前两年在一家做电商的公司做了一个需求:鼠标框选商品卡片,开始拖拽的时候合成一个然后改变位置,页面上有几千个所以还要结合虚拟列表.当时 ...

  2. 记录--关于前端的音频可视化-Web Audio

    这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 背景 最近听音乐的时候,看到各种动效,突然好奇这些音频数据是如何获取并展示出来的,于是花了几天功夫去研究相关的内容,这里只是给大家一些代码 ...

  3. AntvG6-graph图谱工具

    1 快速上手 1.1 在项目中使用 npm 包引入 Step 1: 使用命令行在项目目录下执行以下命令 npm install --save @antv/g6 Step 2: 在需要用的 G6 的 J ...

  4. IDEA 突然无法打开 解决办法

    如果实在没有方法了可以试一试 删除所有的配置文件,默认位置C:\Users\${你的用户名}\${.IntelliJIdea+版本} 注意:删除配置后之前所有的设置都会失效,谨慎操作.

  5. Kingbase ES 游标跨事务及其案例一则

    前言 本文介绍游标在PLSQL和SQL层跨事务使用案例,及其案例一则. 本文验证版本: db0=# select version(); db0-# / version ---------------- ...

  6. 【非插件实现】wordpress网站页脚添加,网站总访问数/今日访客数

    1 /** 2 * 统计全站总访问量/今日总访问量/当前是第几个访客 3 * @return [type] [description] 4 */ 5 function wb_site_count_us ...

  7. CSS浮动---float

    一.标准文档流的特性 1.空白折叠 无论多少个空格.换行.tab,都会折叠为一个空格. 2.高矮不齐,底边对齐 3.自动换行,一行放不下就换行写 二.行内元素和块级元素的注意点 1.行内元素不能设置宽 ...

  8. SQLAlchemy详解

    一.SQLAlchemy介绍 SQLAlchemy 是 Python SQL 工具包和对象关系映射器,为应用程序开发人员提供 SQL 的全部功能和灵活性. SQLAlchemy支持SQLite.Pos ...

  9. JDK10的新特性:var泛型和多个接口实现

    目录 简介 实现多个接口 使用多个接口 使用var 总结 简介 在JDK10的新特性:本地变量类型var中我们讲到了为什么使用var和怎么使用var. 今天我们来深入的考虑一下var和泛型,多个接口实 ...

  10. Go 语言中 For 循环:语法、使用方法和实例教程

    for循环用于多次执行特定的代码块,每次都可以使用不同的值.每次循环执行都称为一次迭代.for循环可以包含最多三个语句: 语法 for 语句1; 语句2; 语句3 { // 每次迭代要执行的代码 } ...