在安装完成了 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. 爬虫实战:从HTTP请求获取数据解析社区

    在过去的实践中,我们通常通过爬取HTML网页来解析并提取所需数据,然而这只是一种方法.另一种更为直接的方式是通过发送HTTP请求来获取数据.考虑到大多数常见服务商的数据都是通过HTTP接口封装的,因此 ...

  2. TP6框架--EasyAdmin学习笔记:项目初始化+环境配置

    最近在研究一个基于TP6的框架EasyAdmin,这里分享下我的开发心得 首先要获取原始项目文件 这里是git地址 https://github.com/zhongshaofa/easyadmin 项 ...

  3. 那位拿了多个Offer的大佬分享了最新Go面经

    和大家分享一下我们 Go就业训练营 和 升职加薪星球 中战友们投稿的真实面经. 这是第一篇,计划还会再更新4篇最新Go面经,都是拿到Offer的那种! 欢迎大家关注我的账号,关注之后不迷路. 先秀战绩 ...

  4. 使用sbt对Scala程序进行打包并运行(Spark单机运行)

    十.使用sbt对Scala程序进行打包并运行(Spark单机运行) 在./sparkapp 中新建文件 simple.sbt(vim ./sparkapp/simple.sbt),添加内容如下,声明该 ...

  5. 前端使用 Konva 实现可视化设计器(1)

    使用 konva 实现一个设计器交互,首先考虑实现设计器的画布. 一个基本的画布: [展示]网格.比例尺 [交互]拖拽.缩放 "拖拽"是无尽的,"缩放"是基于鼠 ...

  6. #dp,排列#LOJ 2743「JOI Open 2016」摩天大楼

    题目 将互不相同的 \(n\) 个数重排,使得相邻两数差的总和不超过 \(L\) 的有多少种方式. \(n\leq 100,L\leq 1000\) 分析 对于排列的问题,有一种很妙的方法就是从小到大 ...

  7. C# 面向对象编程解析:优势、类和对象、类成员详解

    C# - 什么是面向对象编程? OOP代表面向对象编程. 过程式编程涉及编写执行数据操作的过程或方法,而面向对象编程涉及创建包含数据和方法的对象. 面向对象编程相对于过程式编程具有几个优势: OOP执 ...

  8. 天气数据爬取+pyechart可视化

    数据爬取/处理 爬取深圳2021年全年的天气历史数据. 网址链接:https://lishi.tianqi.com/shenzhen/ 代码: import requests from lxml im ...

  9. HMS Core机器学习服务实现同声传译,支持中英文互译和多种音色语音播报

    当用户有跨语种交流或音频内容翻译的需求时,应用需要能自动检测语音内容再输出为用户需要的语言文字. HMS Core机器学习服务提供同声传译能力,同声传译实现将实时输入的长语音实时翻译为不同语种的文本以 ...

  10. HDC2021技术分论坛:鸿蒙智联平台——智能硬件伙伴的最佳拍档

    作者:chengjie,鸿蒙智联生态服务平台运营经理 您在产品开发和运营过程中是否遇到过以下问题: 产品开发千头万绪,无从下手?产品上市后不能清晰地了解消费者的使用情况?用户的意见无法及时传递和答复, ...