1
所以,當我複製使用迪爾斯%userprofile%\Desktop\Out
和%userprofile%\Desktop\Out\test
的.txt
被複制,但是我得到的錯誤The file cannot be copied onto itself.
複製在FOR循環的作品,但一直給錯誤「的文件不能被複制到自身」
當我運行與%userprofile%\Desktop\Out
和腳本運行順利。
所以我的問題是爲什麼當你從一個普通的根文件夾複製到不同的子文件夾時,腳本會感到困惑?
@ECHO ON
FOR /r "%userprofile%\Desktop\Out" %%a IN (*.txt) DO copy "%%a" "%userprofile%\Desktop\New Folder"
pause
當'%userprofile%\ Desktop \ Out \ test'中已經存在'* .txt'文件時,會出現這種情況,這些文件被'for userRFile%\ Desktop \ Out「枚舉出來...... – aschipfl