xcopy /E /V /I /F /Y "C:\Program Files (x86)\Diablo III" "H:\programs\Diablo III"
cmd /C rd /S /Q "C:\Program Files (x86)\Diablo III"
cmd /C mklink /J "C:\Program Files (x86)\Diablo III" "H:\programs\Diablo III"
这是 steam mover 在将程序移动到另一个文件夹时所使用的。
为什么要使用 xcopy?常规复制或移动命令有什么问题?
为什么cmd /C mklink /J "C:\Program Files (x86)\Diablo III" "H:\programs\Diablo III"
为什么不直接做
mklink /J "C:\Program Files (x86)\Diablo III" "H:\programs\Diablo III"
那种事为什么要在命令前面加上cmd /c
?
我知道 rd 是一个命令。但我不知道 cmd 是什么。
答案1
步骤1:将有关 D3 的所有内容从 C:\program files 复制到 H:\program files
第2步:由于我们已经将所有内容从 C 盘中复制出来,因此请从 C:\program files 中删除该程序
步骤3:使用目录连接创建符号链接。这会在两个目录之间创建别名。因此,如果暴雪启动器正在寻找 C:\program files\d3,它将被转发到 h:\program files\d3。此步骤很重要,这样其他应用程序就不必在新的位置查找文件。
xcopy 能够复制文件夹层次结构,并且复制仅用于文件(通常)。
因此,您现在拥有的是:
xcopy
/E (Copy folders and subfolders)
/V (Verify that the new files were written correctly)
/I (If in doubt always assume the destination is a folder, e.g. when the destination does not exist.)
/F (Display full source and destination file names while copying.)
/Y (Suppress prompt to confirm overwriting a file.)
from c:\program files\d3
to h:\program files\d3
_____
cmd (Start a new CMD shell and (optionally) run a command/executable program.)
/C (Run Command and then terminate)
rd (remove directory (delete the folder we are about to specify))
/S (Delete all files and subfolders in addition to the folder itself. Use this to remove an entire folder tree.)
/Q (Quiet - do not display Y/N confirmation)
for the old game directory c:\program files\d3
______
cmd (Start a new CMD shell and (optionally) run a command/executable program.)
/C (Run Command and then terminate)
mklink (Create a symbolic link to a directory or a file, or create a hard file link or directory junction.)
/J (Create a Directory Junction.)
between C:\program files\d3 and h:\program files\d3