2017-08-03 40 views
0

我將自己回答此問題以獲取信息,因爲我無法在Google上找到答案。我需要運行一個命令,將文件夾foo複製到與foo相同的位置,並將其命名爲bar。 (見下面的圖片) current state desired state如何使用新名稱將目錄和內容複製到同一位置

我試圖複製命令的幾個變化,並複製到其他位置重命名,然後移回,但是這是對我的口味太複雜。請隨時擴大我的答案,如果我失去了一些東西。 感謝

回答

1

不是說這是完美的,但是這對我來說是

#first move to the desired working directory 
cd C:\temp 
#then run the following command using exactly the syntax below 
xcopy .\foo .\bar\ 

這是對我工作什麼工作。

相關問題